From 47054a766f067e2c82b477654e0b29811af90faa Mon Sep 17 00:00:00 2001 From: Jordan Winters Date: Tue, 21 Jul 2026 16:29:36 -0500 Subject: [PATCH] fix(ci): fail health check when sitemap route checks fail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The per-route loop in the "Check site availability" step piped jq output into `while read`, which runs the loop in a pipeline subshell. FAILED=1 set inside it never reached the parent shell, so the final exit check only reflected the robots.txt/sitemap.xml probes — an individual route outage could never fail the job. Feed the loop via process substitution instead, keeping it in the parent shell so route failures propagate. Log output (✅/❌ lines) is unchanged. Co-Authored-By: Claude Fable 5 --- .github/workflows/health-check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/health-check.yml b/.github/workflows/health-check.yml index 09080a3..948d0a7 100644 --- a/.github/workflows/health-check.yml +++ b/.github/workflows/health-check.yml @@ -54,7 +54,7 @@ jobs: FAILED=0 # Check all routes from sitemap - echo "$CHECKS" | jq -c '.[]' | while read -r check; do + while read -r check; do URL=$(echo "$check" | jq -r '.url') NAME=$(echo "$check" | jq -r '.name') @@ -64,7 +64,7 @@ jobs: echo "❌ $NAME: FAILED" FAILED=1 fi - done + done < <(echo "$CHECKS" | jq -c '.[]') # Check essential meta files if curl -f -s --max-time 10 "$SITE_URL/robots.txt" > /dev/null; then