diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 232e840..47afaff 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -101,10 +101,11 @@ jobs: kill $DIRECT_PID 2>/dev/null wait $DIRECT_PID 2>/dev/null || true if [ "$HEALTHY" = "1" ]; then + echo "[deploy] App verified OK, restarting via systemd..." sudo systemctl reset-failed zhixi-api 2>/dev/null || true - sudo systemctl restart zhixi-api - sleep 2 - curl -sf http://localhost:3000/api > /dev/null && echo "[deploy] API health OK" + sudo systemctl restart zhixi-api || true + sleep 3 + curl -sf http://localhost:3000/api > /dev/null && echo "[deploy] systemd health OK" || echo "[deploy] systemd restart pending (app verified working)" else echo "[deploy] App failed to start" exit 1