Skip to content

Commit 1c15e97

Browse files
authored
Merge pull request #71 from badhonparvej481/devops
Devops
2 parents d505ffb + 0192486 commit 1c15e97

File tree

2 files changed

+152
-0
lines changed

2 files changed

+152
-0
lines changed

.github/workflows/cicd_main.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Nur UI CI/CD Pipeline
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
name: 🧪 Run Tests
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v3
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: "20"
24+
cache: "yarn"
25+
26+
- name: Install dependencies
27+
run: yarn install
28+
29+
- name: Run lint
30+
run: yarn lint
31+
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
55+
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 }}

.github/workflows/cidevops.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Nur UI CI/CD Pipeline
2+
3+
on:
4+
push:
5+
branches:
6+
- devops
7+
pull_request:
8+
branches:
9+
- devops
10+
11+
jobs:
12+
test:
13+
name: 🧪 Run Tests
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v3
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: "20"
24+
cache: "yarn"
25+
26+
- name: Install dependencies
27+
run: yarn install
28+
29+
- name: Run lint
30+
run: yarn lint
31+
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
55+
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)