Skip to content

Commit e3d7bd1

Browse files
authored
Create ci.yml
1 parent b3dd0c1 commit e3d7bd1

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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

0 commit comments

Comments
 (0)