-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (66 loc) · 1.85 KB
/
CICDOnNginx.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: CI/CD on Nginx
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
on:
push:
branches:
- main
jobs:
deploy-client:
runs-on: ubuntu-latest
steps:
- name: deploy client
uses: appleboy/[email protected]
with:
host: ${{ secrets.SIMULB }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.SIMULB_PORT }}
script: |
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
npm --help
cd /home/boostForm
git pull
cd /home/boostForm/client
npm i
npm run build
deploy-server01:
runs-on: ubuntu-latest
steps:
- name: deploy server01
uses: appleboy/[email protected]
with:
host: ${{ secrets.SIMU01 }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.SIMU01_PORT }}
script: |
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
npm --help
cd /root/boostForm
git pull
cd /root/boostForm/server
npm i
pm2 reload all
deploy-server02:
runs-on: ubuntu-latest
steps:
- name: deploy server02
uses: appleboy/[email protected]
with:
host: ${{ secrets.SIMU02 }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.SIMU02_PORT }}
script: |
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
npm --help
cd /root/boostForm
git pull
cd /root/boostForm/server
npm i
pm2 reload all
# pm2 start npm --name "client" -- start
# pm2 start npm --name "server" -- start