File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Node.js CI
2
+
3
+ on :
4
+ push :
5
+ branches : [ "main" ]
6
+ pull_request :
7
+ branches : [ "main" ]
8
+
9
+ jobs :
10
+ build :
11
+ runs-on : self-hosted
12
+
13
+ strategy :
14
+ matrix :
15
+ node-version : [20.x]
16
+
17
+ steps :
18
+ - uses : actions/checkout@v4
19
+
20
+ - name : Use Node.js ${{ matrix.node-version }}
21
+ uses : actions/setup-node@v4
22
+ with :
23
+ node-version : ${{ matrix.node-version }}
24
+
25
+ - name : Setup pnpm
26
+ uses : pnpm/action-setup@v2
27
+ with :
28
+ version : 8 # You can pin to the version you want (e.g. 8.15.4)
29
+ run_install : false
30
+
31
+ - name : Install dependencies
32
+ run : pnpm install
33
+
34
+ - name : Build the project
35
+ run : pnpm run build --if-present
36
+
37
+ - name : Setup .env
38
+ run : |
39
+ touch .env
40
+ echo "${{ secrets.CALL_SECRETES }}" > .env
41
+
42
+ - name : Restart API with PM2
43
+ run : pm2 restart BackendAPI
You can’t perform that action at this time.
0 commit comments