Skip to content

Next.js CI

Next.js CI #8

Workflow file for this run

name: Next.js CI
on:
push:
branches:
- "main"
release:
types:
- created
jobs:
build:
name: 🎉 Build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["20.x"]
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4 # Обновлено на версию 4
with:
node-version: ${{ matrix.node-version }}
- name: 🔨 Build Project
run: |
npm ci
npm run build --if-present
- name: List output files
run: find out/ -print
- name: Upload artifact
uses: actions/upload-artifact@v4 # Обновлено на версию 4
with:
name: Build
path: out
release:
name: 🚀 Release
needs: build
if: startsWith(github.event_name, 'release')
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4 # Обновлено на версию 4
with:
node-version: 20.x
- name: 🔑 Setup SSH
uses: webfactory/ssh-agent@v1 # Обновлено на версию 1
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: 🚀 Deploy Release
run: |
# Ваши команды развертывания здесь
echo "Deploying release..."