Skip to content

Commit cfbdd05

Browse files
update ci/cd
1 parent 3012333 commit cfbdd05

File tree

1 file changed

+52
-6
lines changed

1 file changed

+52
-6
lines changed

.github/workflows/cid.yml

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
1-
name: NurUI CI
1+
name: Nur UI CI/CD Pipeline
22

33
on:
44
push:
55
branches:
66
- devops
77
pull_request:
8+
branches:
9+
- devops
810

911
jobs:
10-
build:
12+
test:
13+
name: 🧪 Run Tests
1114
runs-on: ubuntu-latest
1215

1316
steps:
14-
- name: Checkout repository
17+
- name: Checkout code
1518
uses: actions/checkout@v3
1619

17-
- name: Use Node.js
20+
- name: Setup Node.js
1821
uses: actions/setup-node@v4
1922
with:
2023
node-version: "20"
@@ -23,8 +26,51 @@ jobs:
2326
- name: Install dependencies
2427
run: yarn install
2528

26-
- name: Lint
29+
- name: Run lint
2730
run: yarn lint
2831

29-
- name: Build project
32+
# Replace with your actual test command if you add test framework (e.g. jest)
33+
- name: Run tests
34+
run: echo "No tests yet" && exit 0
35+
36+
build:
37+
name: 🛠️ Build Project
38+
runs-on: ubuntu-latest
39+
needs: test
40+
41+
steps:
42+
- name: Checkout code
43+
uses: actions/checkout@v3
44+
45+
- name: Setup Node.js
46+
uses: actions/setup-node@v4
47+
with:
48+
node-version: "20"
49+
cache: "yarn"
50+
51+
- name: Install dependencies
52+
run: yarn install
53+
54+
- name: Build the app
3055
run: yarn build
56+
57+
- name: Upload build artifacts
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: nextjs-build
61+
path: .next/
62+
63+
deploy:
64+
name: 🚀 Deploy to Vercel
65+
runs-on: ubuntu-latest
66+
needs: build
67+
68+
steps:
69+
- name: Checkout code
70+
uses: actions/checkout@v3
71+
72+
# - name: Install Vercel CLI
73+
# run: npm install -g vercel
74+
75+
# - name: Deploy to Vercel
76+
# run: vercel --prod --token=${{ secrets.VERCEL_TOKEN }}

0 commit comments

Comments
 (0)