File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments