Skip to content

fix project paths

fix project paths #75

Workflow file for this run

name: autodeploy
on:
push:
branches:
- hetzner
jobs:
autodeploy:
runs-on: hetzner
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Use Node 18.x
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: List files in the repository
run: |
ls ${{ github.workspace }}
- name: Install and deploy
run: |
npm install
npm run build
sudo supervisorctl stop api
rm -rf ${{ secrets.WWW_ROOT }}/api/*
cp -r ./ ${{ secrets.WWW_ROOT }}/api/
cp ${{ secrets.WWW_ROOT }}/.env.api ${{ secrets.WWW_ROOT }}/api/.env
- name: Run database migrations
run: |
cd ${{ secrets.WWW_ROOT }}/api && npm run migration:run
- name: Start server
run: |
sudo supervisorctl start api