Repository navigation
ci: deploy the marketing and docs sites to Cloudflare Workers - #79
Merged
Merged
Conversation
Marketing goes to code-zero.dev and the docs to docs.code-zero.dev as two static Workers. Both sites are generated with `nuxt generate`, so each wrangler.jsonc only uploads .output/public: no script, no bindings, the generated 404 page for unknown paths, and trailing slashes redirected to the canonical URL. Docs search keeps working because Docus queries its content dump in the browser. deploy-sites.yml builds and deploys both on pushes to main that touch them and on manual dispatch, using the CLOUDFLARE_API_TOKEN secret and the CLOUDFLARE_ACCOUNT_ID variable. Wrangler runs through npx at a pinned version rather than through an action, which would try to install it with the package manager the lockfile implies. The marketing Docs links now point at docs.code-zero.dev instead of the README, and the vercel.json files stay for pull request previews.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note The title starts with
|
Both sites build workspace packages through scripts/tsdown.config.ts, the root package and workspace manifests, turbo.jsonc and the setup-toolchain action. A change to any of them alone did not start deploy-sites.yml, so the live sites kept the old build until something else triggered it.
The docs build listed only .output as a Turbo output, while the Nitro vercel preset writes .vercel/output. A cache hit on Vercel therefore restored no bundle and the preview failed looking for a dist directory, as it did on a commit that only touched the deploy workflow. NUXT_SITE_URL now changes the generated sitemap and canonical links, so it joins the env of both site builds, and the docs build also keys on NITRO_PRESET and VERCEL so a Vercel and a Cloudflare build never share a cache entry.
greptile-apps
Bot
dismissed
their stale review
October 19, 2026 10:48
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
This branch was successfully deployed
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.
Summary
Related to #5. Moves the public sites to Cloudflare, on top of #71: the marketing site to
code-zero.devand the docs todocs.code-zero.dev, as two static Workers.nuxt generate, so each app'swrangler.jsonconly uploads.output/public. There is no script and no binding: unknown paths get the generated404.html, and/pricing/redirects to/pricingso the served URL matches the canonical one.deploy-sites.ymlbuilds and deploys both on pushes tomainthat touch them, and on manual dispatch. Wrangler runs throughnpxat a pinned version:cloudflare/wrangler-actioninstalls wrangler with the package manager the lockfile implies, which is pnpm here, and that is not installed.NUXT_SITE_URLis set per site, so sitemaps, canonical links androbots.txtuse the real domains.docs.code-zero.devinstead of the README.vercel.jsonfiles stay, so pull requests keep their Vercel previews until Cloudflare is confirmed working.Why
Cloudflare is where the managed cloud will run, and the public sites are the simplest part of it to move: both are static, so they need nothing at request time.
Verification
aube run check:repoaube run lint:ciaube run typecheckaube testaube run buildSafety and compatibility
observemode as read-only, or explained the policy change above.📝 Migration
Before the first run of
deploy-sites.yml:code-zero.devzone, and store it as the repository secretCLOUDFLARE_API_TOKEN.CLOUDFLARE_ACCOUNT_ID.code-zero.devanddocs.code-zero.devhave no conflicting DNS records: Workers custom domains create their own.Agent context
wrangler dev: every page answered 200 without redirects, trailing slashes and unknown paths behaved as above, sitemaps used the real domains, and docs search returned results. zizmor reports no findings.Reviewer notes
app.code-zero.devis a separate, larger change: it needs Hyperdrive in front of Postgres and a replacement for the in-process poller.

Confidence Score: 5/5
No outstanding findings block merging.Reviews (3) · Last reviewed commit: "fix(ci): cache the docs Vercel bundle an..." · Reviewed by Greptile