Skip to content

Commit e689c98

Browse files
authored
Create node.js.yml
1 parent 6ae338e commit e689c98

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/node.js.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:
6+
- main # or any branch you'd like to trigger on
7+
pull_request:
8+
branches:
9+
- main # or any branch you'd like to trigger on
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
# Check out the code from the repository
17+
- name: Checkout repository
18+
uses: actions/checkout@v2
19+
20+
# Set up Node.js
21+
- name: Set up Node.js
22+
uses: actions/setup-node@v2
23+
with:
24+
node-version: '16' # Specify the Node.js version you need
25+
26+
# Install dependencies
27+
- name: Install dependencies
28+
run: |
29+
cd src/npm
30+
npm install express multer axios cors
31+
32+
# Run your Node.js application (server.js)
33+
- name: Run server.js
34+
run: |
35+
cd src/npm
36+
node server.js

0 commit comments

Comments
 (0)