Skip to content

Deploy

Deploy #16

Workflow file for this run

name: Deploy
on:
workflow_dispatch:
push:
tags:
- 'v*'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy to DO
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: |
cd /home/vimracing
git fetch origin
git reset --hard origin/main
yarn
cd shared
yarn build
cd ../frontend
yarn build
pm2 delete -s vimracing || :
pm2 start "yarn start" --name vimracing
cd ../backend
yarn run build
pm2 delete -s api.vimracing || :
pm2 start dist/index.js --name api.vimracing