Skip to content

Commit

Permalink
Update next.js.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
shurkys authored May 17, 2024
1 parent 5c43370 commit c47fcf1
Showing 1 changed file with 32 additions and 7 deletions.
39 changes: 32 additions & 7 deletions .github/workflows/next.js.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ name: Next.js CI

on:
push:
branches: ["main"]
branches:
- "main"
release:
types:
- created

jobs:
build:
name: πŸŽ‰ Deploy
name: πŸŽ‰ Build
runs-on: ubuntu-latest

strategy:
Expand All @@ -21,6 +25,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: πŸ”¨ Build Project
run: |
npm ci
Expand All @@ -34,9 +39,29 @@ jobs:
with:
name: Build
path: out
- name: Release
uses: softprops/action-gh-release@v1

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@v3
with:
files: out
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
node-version: 20.x

- name: πŸ”‘ Setup SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: πŸš€ Deploy Release
run: |
# Your deployment commands here
echo "Deploying release..."

0 comments on commit c47fcf1

Please sign in to comment.