Skip to content

Workflow file for this run

name: Deploy Express App
# Controls when the action will run.
on:
# Triggers the workflow on push events but only for the main branch
push:
branches: [ main ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy using ssh
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: 22
script: |
cd InventoryNest
git pull origin main
npm install --only=prod
pm2 reload InventoryNest || pm2 start server.js --name InventoryNest --watch