diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 42c2c16..1c3e8f4 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -31,7 +31,9 @@ jobs: - name: Restart pm2 if: github.event_name == 'push' && github.ref == 'refs/heads/main' run: | - pm2 reload tetardpg-backend --update-env + pm2 describe tetardpg-backend >/dev/null 2>&1 \ + && pm2 reload tetardpg-backend --update-env \ + || (cd /var/www/tetardpg/backend && pm2 start dist/main.js --name tetardpg-backend && pm2 save) # ── Frontend ───────────────────────────────────────────────────────────── - name: Install & build frontend