diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 3ba5a1b..b2e1664 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -425,24 +425,22 @@ jobs: - name: Install dependencies run: | pnpm install --no-frozen-lockfile - - name: 🏥 CMS Deep Health Check + - name: 🏥 App Health Check env: DEPLOY_URL: ${{ needs.prepare.outputs.next_public_url }} run: | echo "Waiting for app to start at $DEPLOY_URL ..." - for i in {1..20}; do - HTTP_CODE=$(curl -sk -o /tmp/health.json -w '%{http_code}' "$DEPLOY_URL/api/health/cms" 2>&1) || true + for i in {1..30}; do + HTTP_CODE=$(curl -sk -o /dev/null -w '%{http_code}' "$DEPLOY_URL" 2>&1) || true echo "Attempt $i: HTTP $HTTP_CODE" - if [ "$HTTP_CODE" = "200" ]; then - echo "✅ CMS health OK" - cat /tmp/health.json + if [[ "$HTTP_CODE" =~ ^2 ]]; then + echo "✅ App is up (HTTP $HTTP_CODE)" exit 0 fi echo "⏳ Waiting... (got $HTTP_CODE)" - sleep 5 + sleep 10 done - echo "❌ CMS health check failed after 20 attempts" - cat /tmp/health.json 2>/dev/null || true + echo "❌ App health check failed after 30 attempts" exit 1 - name: 🚀 OG Image Check env: