Add wrangler.jsonc for docs.teemops.com Workers deploy - #114
Merged
Conversation
Cloudflare's dashboard build for docs.teemops.com now uses the unified Workers Builds system (`wrangler deploy` / `wrangler versions upload`), which reads its output directory from a wrangler config in the repo rather than a dashboard field. Without one, deploys failed with "Could not detect a directory containing static files" because there was nothing telling Wrangler that `mkdocs build`'s output lives in `site/`. Points assets.directory at `./site` and sets not_found_handling to "404-page" so mkdocs' generated 404.html is served instead of Cloudflare's blank default. No Worker script needed — this is a pure static-assets deploy, verified locally with `mkdocs build` + `wrangler deploy --dry-run`. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Cloudflare's dashboard build for docs.teemops.com is configured on the unified Workers Builds system (
wrangler deploy/wrangler versions upload), not classic Pages, and that system reads its static-assets output directory from a wrangler config in the repo rather than a dashboard "build output directory" field. Deploys were failing with "Could not detect a directory containing static files" because no such config existed — nothing told Wrangler thatmkdocs build's output lives insite/.User story
Infrastructure change — no user story.
How it was tested
mkdocs buildlocally, confirmedsite/contains the expected static HTML (including404.html).npx wrangler deploy --dry-runagainst the built site: read 85 files fromsite/, no bindings needed, no errors..gitignorealready excludes/site/as a build artifact — only the config is committed.Quality gate
docs/practices/— no secrets, no speculative config beyond what's needed to deploydocsCI job already buildssite/on every push, which is the closest available checkPractices check
not_found_handlingOut of scope
Renaming the Cloudflare project if
tops-docsever needs to change — confirmed correct for now.Made with Cursor