Skip to content

Commit 54619f2

Browse files
committed
Merge branch 'main' of https://github.com/code-env/Call
2 parents a58337b + 9e6baa4 commit 54619f2

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/node.js.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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

0 commit comments

Comments
 (0)