Skip to content

add ci/cd

add ci/cd #1

Workflow file for this run

name: Deploy to VPS
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Deploy via SSH
uses: appleboy/ssh-action@v1.0.0
with:
host: 91.229.245.38
username: root
key: ${{ secrets.VPS_SSH_KEY }}
script: |
cd /projects/hamar/api
git pull
npm install
npm run build
pm2 restart hamar-api