Deploy
The Cloudflare Workers deployment model for the styleguide, demo, and documentation sites.
Public sites
zudo-sg deploys static builds to Cloudflare Workers. The intended public topology is:
| Site | Worker | Domain | Build output |
|---|---|---|---|
| Styleguide host | zudo-sg | https: | dist/ |
| Demo app | zudo-sg-demo-site | https: | apps/ |
| Documentation site | zudo-sg-doc | https: | doc/dist/ |
All three sites are static. They do not need an SSR worker entrypoint while every route can be prerendered.
Cloudflare setup
Deployment needs two GitHub Actions secrets:
CLOUDFLARE_ACCOUNT_IDCLOUDFLARE_API_TOKEN
The API token needs Workers edit access and enough zone permission for custom domain provisioning. Because the takazudomodular.com zone is managed in Cloudflare and the Workers configs use custom_domain = true, wrangler deploy can create the DNS records and TLS certificates during the first deploy.
CI flow
Main-branch deployment builds the static sites, deploys the Workers, and runs smoke checks against the custom domains. First deploys can need a short DNS and certificate propagation window, so smoke checks use retry behavior instead of assuming the first request will resolve.
Pull requests from this repository into main deploy GitHub's synthetic merge ref to stable pr-<number> Worker preview aliases, representing the proposed changes applied to main when the workflow run starts. The workflow posts one updated PR comment with links to the styleguide, demo, and documentation previews. Fork and Dependabot pull requests skip deployment because those runs cannot access the Cloudflare secrets; ordinary PR checks still validate them.
Pushes to the dedicated preview branches retain branch-based aliases. Neither kind of preview publishes a production Worker version or changes a custom domain.
Local validation
Use build and link checks before relying on deployment:
pnpm build
pnpm --filter @zudo-sg/demo build
pnpm --filter @zudo-sg/doc build
pnpm check:links
pnpm check:links:demo
node scripts/check-links.mjs --dist=doc/distFor docs-only changes, the filtered docs build and the link check against doc/dist are the relevant deploy-safety checks.
Static Worker config shape
Static Workers use an assets directory and a 404 fallback. They intentionally omit main and nodejs_compat while the site has no SSR routes.
If a future site adds a non-prerendered route, wire the Cloudflare adapter in that site's zfb.config.ts, add a worker entrypoint to the matching Wrangler config, and add the assets-ignore step before deploy.