-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (33 loc) · 955 Bytes
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Deploy Next.js App
on:
push:
branches:
- test
jobs:
build:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout code
- name: Checkout code
uses: actions/checkout@v3
# Step 2: Setup Node.js
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18 # Change to your Node.js version
cache: 'npm'
# Step 3: Install dependencies
- name: Install dependencies
run: npm install
# Step 4: Build the app
- name: Build Next.js app
run: npm run build
# Step 5: Deploy to Vercel (Optional)
- name: Deploy to Vercel
uses: amondnet/[email protected]
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ vars.VERCEL_ORG_ID }}
vercel-project-id: ${{ vars.VERCEL_PROJECT_ID }}
working-directory: ./
vercel-args: '--prod'