Skip to content

deploy test

deploy test #9

Workflow file for this run

name: Update and rebuild on the server
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup SSH Agent
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.HOST_SSH_KEY }}
- name: Deploy to webserver
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.HOST_USERNAME }}@${{ secrets.HOST_IP }} "
cd /home/website/crmn.to
git fetch && git reset --hard origin/master
npm install
npm run build
pm2 delete crmn.to
pm2 start ecosystem.config.cjs
"