Skip to content

Deploy only the site, not the repository's internals - #9

Merged
tgwab-claude merged 1 commit into
mainfrom
fix/deploy-stage-site
Sep 14, 2026
Merged

tgwab-claude merged 1 commit into
mainfrom
fix/deploy-stage-site

Conversation

@tgwab-claude

Copy link
Copy Markdown
Contributor

wrangler pages deploy . uploads the repository root. On 2026-09-14, capondargan.com served these paths with HTTP 200: README.md, scripts/no-eval.sh, scripts/check-citations.sh, .github/ruleset-main.json, and .github/workflows/ci.yml.

Change. The deploy job now stages the site into _site/ with rsync and uploads _site. The stage excludes .git, .github/, .gitignore, .nvmrc, scripts/, and Markdown. A verify step then fails the deploy in either direction:

  • if an internal path was staged, or
  • if a required file is missing: index.html, 404.html, _headers, _redirects, robots.txt, or .well-known/security.txt.

The README's deploy notes now describe the stage, and .gitignore ignores _site/. This follows MichalAFerber/bethhudsonink.com#32, and adds the check against dropped files.

Tested. I ran the exact run: bodies extracted from this workflow's YAML against this branch:

  • A clean stage passes. The staged top level is .well-known 404.html LICENSE _headers _redirects ads.txt apple-touch-icon.png assets cowan directions favicon.ico humans.txt icon-192.png icon-512-maskable.png icon-512.png index.html llms.txt og.png providers resources robots.txt site.webmanifest sitemap-index.xml sitemap.xml.
  • With README.md copied into _site/, verify exits 1.
  • With _headers removed, verify exits 1.

Not yet verified. The PR preview deploy and the production deploy after merge. After each one I'll check that /README.md returns 404 and / returns 200. The edge may keep serving previously cached copies of the removed files until their cache lifetime ends.

Found while working on #8; this PR does not close it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KX5fU4VDLe5MbyaytQJByw

`wrangler pages deploy .` uploaded the repository root, so capondargan.com
served README.md, scripts/*.sh, .github/ruleset-main.json, and
.github/workflows/ci.yml. The deploy now stages the site into _site/ and
uploads that. A verify step fails the deploy if an internal path was staged,
or if a file the site needs was dropped by the excludes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KX5fU4VDLe5MbyaytQJByw
@tgwab-claude
tgwab-claude merged commit 0373478 into main Sep 14, 2026
2 checks passed
@tgwab-claude
tgwab-claude deleted the fix/deploy-stage-site branch September 14, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants