-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from boostcampwm2023/hotfix/59-fix-deploy-script
[Hotfix] 배포 스크립트 오류 수정
- Loading branch information
Showing
1 changed file
with
36 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,40 @@ | ||
name: deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
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 | ||
killall node | ||
npm start | ||
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 | ||
npm start | ||
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 & |