Skip to content

Fix CI/CD

Fix CI/CD #17

Workflow file for this run

name: Deploy to VPS
on:
pull_request:
types: [closed]
branches: [main]
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- name: Deploy to VPS
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.VPS_HOST }}
username: ${{ secrets.VPS_USERNAME }}
key: ${{ secrets.VPS_SSH_KEY }}
script: |
npm install -g pnpm pm2
cd ~/gov-api
git pull origin main
pnpm install
pnpm run build
pm2 reload gov-api || pm2 start dist/main.js --name gov-api --time