File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Next.js CI/CD Workflow
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - name : Checkout Repository
17+ uses : actions/checkout@v2
18+
19+ - name : Set up Node.js
20+ uses : actions/setup-node@v2
21+ with :
22+ node-version : ' 22'
23+
24+ - name : Install Dependencies
25+ run : |
26+ npm install
27+
28+
29+ - name : Run Linting
30+ run : npm run lint
31+ continue-on-error : true
32+
33+ - name : Run Tests
34+ run : npm run test
35+ continue-on-error : true
36+
37+ - name : Build the Project
38+ run : npm run build
39+
40+ - name : Deploy (Optional, if using Vercel)
41+ env :
42+ VERCEL_TOKEN : ${{ secrets.VERCEL_TOKEN }} # Set your Vercel token as a GitHub secret
43+ run : |
44+ npm install -g vercel
45+ vercel --prod --token $VERCEL_TOKEN
You can’t perform that action at this time.
0 commit comments