sitemap.xml was 404 on the live host; make the build own it
sitemap.mjs was a step I ran by hand, so the moment I rebuilt without it the file vanished from dist and the deploy shipped a site with no sitemap — on a site whose entire point is being findable. Nothing caught it because nothing was looking. It is now inside `pnpm build`, CI asserts the file exists, and deploy.sh smoke-tests /sitemap.xml, /robots.txt and an OG card against the live hostname. The 404 assertion was also a warning rather than a failure; it exits now. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019mt6sHQHEnEYrJZvoMCJSB
This commit is contained in:
@@ -48,6 +48,10 @@ jobs:
|
||||
grep -qv 'PIG Demo — RL environments you can play</title>' dist/demos/wordle/index.html \
|
||||
|| { echo "demo route kept the homepage title"; exit 1; }
|
||||
test -f dist/404.html || { echo "no 404.html"; exit 1; }
|
||||
# sitemap.xml is written by a build step, not by Vite copying public/.
|
||||
# It went missing once because the step was outside `pnpm build`, and
|
||||
# nothing noticed until a 404 on the live host.
|
||||
test -f dist/sitemap.xml || { echo "no sitemap.xml"; exit 1; }
|
||||
|
||||
# A blob-backed worker is blocked in production and nowhere else: the
|
||||
# site's CSP has no worker-src, so it falls back to default-src 'self'.
|
||||
|
||||
Reference in New Issue
Block a user