diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 2ebb1f8..f1ca636 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -486,16 +486,8 @@ jobs: RELOAD_RESULT=$? if [ $RELOAD_RESULT -eq 0 ]; then echo "✅ nginx reloaded successfully" - else - echo "❌ nginx reload failed with exit code $RELOAD_RESULT" - sudo systemctl status nginx --no-pager || true - fi - else - echo "❌ nginx configuration test failed!" - sudo nginx -t || true - exit 1 - fi + # Only proceed with post-reload checks if nginx reload was successful # Wait for services to stabilize after reload echo "⏳ Waiting for services to stabilize after reload..." sleep 5 @@ -685,11 +677,14 @@ jobs: echo "✅ Web app deployment completed" else - echo "❌ nginx configuration test failed!" - sudo nginx -t || true - exit 1 + echo "❌ nginx reload failed, skipping post-reload checks" fi - ' || echo "Step timed out after 20 minutes" + else + echo "❌ nginx configuration test failed!" + sudo nginx -t || true + exit 1 + fi + ' || echo "Step timed out after 20 minutes" ENDSSH final-verification: