Skip to content

Merge pull request #17 from IsuruSandaruwan97/development #10

Merge pull request #17 from IsuruSandaruwan97/development

Merge pull request #17 from IsuruSandaruwan97/development #10

Workflow file for this run

name: Deploy to VPS
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Deploy to VPS via SSH
uses: appleboy/[email protected]
with:
host: ${{ secrets.VPS_HOST }}
username: ${{ secrets.VPS_USER }}
key: ${{ secrets.VPS_PRIVATE_KEY }}
port: ${{ secrets.VPS_PORT }}
script: |
cd /root/inventory-management-api
git pull origin master
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
npm install
npx prisma migrate deploy
npm run build
pm2 restart all # Or the command to restart your application