Skip to content

Commit 7f72c36

Browse files
Added CI/CD pipeline
1 parent db405ea commit 7f72c36

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/nodejs.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Node.js CI/CD
2+
3+
on:
4+
push:
5+
branches: [ master, main ]
6+
pull_request:
7+
branches: [ master, main ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: '18'
21+
22+
- name: Install dependencies
23+
run: npm install
24+
25+
- name: Run Tests
26+
run: npm test
27+
28+
deploy:
29+
needs: build
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout code
33+
uses: actions/checkout@v3
34+
35+
- name: Deploy to Server (Simulation)
36+
run: echo "Pretend we're deploying the app now!"

0 commit comments

Comments
 (0)