ci(deploy): cache-bust smoke test against Cloudflare edge
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).
This commit is contained in:
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user