Skip to content

Frontend

Frontend #72

Workflow file for this run

name: GCP CI/CD
on:
pull_request:
types:
- closed
jobs:
if_merged:
runs-on: ubuntu-latest
steps:
- if: github.event.pull_request.merged == true && github.head_ref == 'feature/Backend'
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
port: 22
script: |
cd ${{ secrets.PWD }}
git pull origin main
cd ${{ secrets.PWD }}/BackendJS/BackendTS
npm install
pm2 restart Traffic
- if: github.event.pull_request.merged == true && github.head_ref == 'Frontend'
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
port: 22
script: |
cd ${{ secrets.PWD }}
git pull origin main
cd ${{ secrets.PWD }}/Backend/Frontend/creative
pm2 stop Traffic
npm install
npm run build
cd ${{ secrets.PWD }}/BackendJS/BackendTS
npm install
pm2 restart Traffic