fix(ci): accept 4xx from API health check (401 = running)

API returns 401 without auth, which proves it's alive. Only 5xx
indicates a real server failure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Martin Porwoll 2026-02-13 22:31:23 +00:00
parent 16f7a203bc
commit d896b72c18

View file

@ -381,9 +381,9 @@ jobs:
API_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "${{ env.PRODUCTION_URL }}/api/users")
echo "API: HTTP $API_STATUS"
# Summary
# Summary (API returns 401 without auth — that's expected and proves it's running)
if [ "$ADMIN_STATUS" -ge 200 ] && [ "$ADMIN_STATUS" -lt 400 ] && \
[ "$API_STATUS" -ge 200 ] && [ "$API_STATUS" -lt 400 ]; then
[ "$API_STATUS" -ge 200 ] && [ "$API_STATUS" -lt 500 ]; then
echo "All health checks passed!"
else
echo "Some health checks failed"