-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (39 loc) · 1.33 KB
/
deploy.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
name: deploy
on:
push:
branches:
- main
jobs:
be-deploy:
runs-on: ubuntu-20.04
steps:
- name: SSH-deploy
uses: appleboy/ssh-action@master
with:
host: ${{secrets.VPC_HOST}}
username: ${{secrets.VPC_USER}}
password: ${{secrets.VPC_PASSWORD}}
port: ${{secrets.VPC_PORT}}
script: |
cd /home/web08-ByeolSoop
git pull origin main
cd BE
npm install --force
fuser -k ${{secrets.BE_PORT}}/tcp
nohup npm run start </dev/null >/dev/null 2>&1 &
fe-deploy:
needs: be-deploy
runs-on: ubuntu-20.04
steps:
- name: SSH-deploy
uses: appleboy/ssh-action@master
with:
host: ${{secrets.VPC_HOST}}
username: ${{secrets.VPC_USER}}
password: ${{secrets.VPC_PASSWORD}}
port: ${{secrets.VPC_PORT}}
script: |
cd /home/web08-ByeolSoop/FE
npm install --force
fuser -k ${{secrets.FE_PORT}}/tcp
nohup npm run start </dev/null >/dev/null 2>&1 &