From 07abb101d4059f23de9a7cec30bed81f6594cd87 Mon Sep 17 00:00:00 2001 From: hsiegeln <37154749+hsiegeln@users.noreply.github.com> Date: Sat, 25 Apr 2026 18:23:18 +0200 Subject: [PATCH] ci(deploy): cache-bust smoke test against Cloudflare edge MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The post-deploy smoke test was fetching www.cameleer.io/ directly, which Cloudflare may serve from edge cache regardless of what rsync just shipped — falsely greenlighting a failed deploy or red-flagging a successful one. Append ?cb=$GITHUB_RUN_ID and Cache-Control: no-cache to both fetches so the edge revalidates per run. Surfaced by code review of the prior commit (4c98caab). --- .gitea/workflows/deploy-placeholder.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy-placeholder.yml b/.gitea/workflows/deploy-placeholder.yml index 312fb5f..38198b8 100644 --- a/.gitea/workflows/deploy-placeholder.yml +++ b/.gitea/workflows/deploy-placeholder.yml @@ -89,11 +89,15 @@ jobs: run: | set -e echo "Confirming the placeholder is live on www.cameleer.io..." - BODY=$(curl -sf https://www.cameleer.io/) + # Cache-bust per run so Cloudflare's edge can't serve a stale response + # that masks a failed deploy. ?cb=$GITHUB_RUN_ID forces a fresh cache key; + # the no-cache request header tells any well-behaved cache to revalidate. + CB="$GITHUB_RUN_ID" + BODY=$(curl -sf -H 'Cache-Control: no-cache' "https://www.cameleer.io/?cb=$CB") echo "$BODY" | grep -qF 'Routes are remapping' \ || { echo "Sentinel string missing — placeholder did not land."; exit 1; } echo "$BODY" | grep -qF 'mailto:' \ || { echo "mailto: link missing — sales email substitution may have failed."; exit 1; } - curl -sfI https://www.cameleer.io/cameleer-logo.png > /dev/null \ + curl -sfI -H 'Cache-Control: no-cache' "https://www.cameleer.io/cameleer-logo.png?cb=$CB" > /dev/null \ || { echo "cameleer-logo.png not reachable on the live origin."; exit 1; } echo "Placeholder is live."