Skip to content

Update deploy.yml

Update deploy.yml #11

Workflow file for this run

name: Deploy api-sirekap-kpu
on:
push:
branches:
- master
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Deploy
uses: appleboy/ssh-action@v1.0.0
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
script: |
cd /var/www/api-sirekap-kpu || exit 1
git pull || exit 1
npm i || exit 1
pm2 ls | grep sirekap-kpu && \
pm2 reload ecosystem.config.cjs || \
pm2 start ecosystem.config.cjs \
pm2 save --force || exit 1