Skip to content

ci: deploy the marketing and docs sites to Cloudflare Workers - #79

Merged
RedStar071 merged 3 commits into
feat/v2-foundationfrom
feat/cloudflare-sites
Oct 19, 2026
Merged

RedStar071 merged 3 commits into
feat/v2-foundationfrom
feat/cloudflare-sites

Conversation

@RedStar071

@RedStar071 RedStar071 commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Summary

Related to #5. Moves the public sites to Cloudflare, on top of #71: the marketing site 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 app's wrangler.jsonc only uploads .output/public. There is no script and no binding: unknown paths get the generated 404.html, and /pricing/ redirects to /pricing so the served URL matches the canonical one.
  • Docs search keeps working without a server, 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. Wrangler runs through npx at a pinned version: cloudflare/wrangler-action installs wrangler with the package manager the lockfile implies, which is pnpm here, and that is not installed.
  • NUXT_SITE_URL is set per site, so sitemaps, canonical links and robots.txt use the real domains.
  • The marketing "Docs" links go to docs.code-zero.dev instead of the README.
  • The vercel.json files 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:repo
  • aube run lint:ci
  • aube run typecheck
  • aube test
  • aube run build

Safety and compatibility

  • I added or updated deterministic tests for changed behavior.
  • I preserved observe mode as read-only, or explained the policy change above.
  • Runtime commands and target-repository writes remain inside the runner boundary.
  • I did not expose secrets, tokens, personal data, or untrusted output in logs.
  • I updated documentation and Agent Skills when workflows or boundaries changed.

📝 Migration

Before the first run of deploy-sites.yml:

  1. Create a Cloudflare API token with Workers Scripts: Edit on the account and Workers Routes: Edit on the code-zero.dev zone, and store it as the repository secret CLOUDFLARE_API_TOKEN.
  2. Set the repository variable CLOUDFLARE_ACCOUNT_ID.
  3. Make sure code-zero.dev and docs.code-zero.dev have no conflicting DNS records: Workers custom domains create their own.

Agent context

  • Agent/tools used: Claude Code (Claude Opus 5.5) in T3 Code.
  • What the agent did, and what you changed or verified yourself: I chose Cloudflare, the domains and the GitHub Actions pipeline. The agent wrote the configuration and served both generated sites with 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

  • The docs build needs about 2.5 GB of heap; the workflow gives it 6 GB.
  • The dashboard on app.code-zero.dev is a separate, larger change: it needs Hyperdrive in front of Postgres and a replacement for the in-process poller.

🤖 AI disclosure: Wolfstar Agent Kit modified this description. My AI open-source policy.

RetriggerView in GreptileConfidence Score: 5/5

No outstanding findings block merging.

Reviews (3) · Last reviewed commit: "fix(ci): cache the docs Vercel bundle an..." · Reviewed by Greptile

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.
@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
agent-zero-docs Ready Ready Preview Oct 19, 2026 10:52am UTC
agent-zero-marketing Ready Ready Preview Oct 19, 2026 10:52am UTC

@coldtea-pr-lens

Copy link
Copy Markdown

Note

The title starts with ci:, so PR Lens left this pull request undrawn. Comment @pr-lens draw to draw it

github.comment.notice: false in .github/pr-lens.yml turns this note off

Comment thread .github/workflows/deploy-sites.yml Resolved
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.
greptile-apps[bot]
greptile-apps Bot previously approved these changes Oct 19, 2026
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
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.

@RedStar071
RedStar071 merged commit dccc43b into feat/v2-foundation Oct 19, 2026
10 checks passed
@RedStar071
RedStar071 deleted the feat/cloudflare-sites branch October 19, 2026 12:33

This branch was successfully deployed

2 active deployments
Preview – agent-zero-docs — ee5b19dd Deployed Oct 19, 2026 by vercel[bot]
Preview – agent-zero-marketing — ee5b19dd Deployed Oct 19, 2026 by vercel[bot]
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.

1 participant