Cloudflare deployment¶
Use two Pages projects connected to Cwtch-Consulting/cwtch-consulting. Names use the repository slug followed by the workload name. Configuration files describe intended resources; they do not create projects, custom domains or DNS records.
Pages settings¶
| Setting | Website | Documentation |
|---|---|---|
| Project name | cwtch-consulting-web |
cwtch-consulting-docs |
| Framework preset | None | None |
| Production branch | main |
main |
| Root directory | Repository root (leave blank) | docs |
| Build command | npx --yes [email protected] ci --include=dev && npx --yes [email protected] run build:web |
python3 -m pip install -r requirements.lock.txt && python3 scripts/build.py build |
| Output directory, relative to root | apps/web/dist |
site |
| Toolchain environment | NODE_VERSION=24.21.0, SKIP_DEPENDENCY_INSTALL=1 |
PYTHON_VERSION=3.12.14, SKIP_DEPENDENCY_INSTALL=1 |
| Primary custom domain | www.cwtchconsulting.com |
docs.cwtchconsulting.com |
| Pages hostname | cwtch-consulting-web.pages.dev |
cwtch-consulting-docs.pages.dev |
| Wrangler configuration | /wrangler.toml |
/docs/wrangler.toml |
Use the Pages v3 build system. Disable automatic dependency installation for both projects so each lockfile is installed once by its build command. The website explicitly runs npm 11.19.0 against the root workspace lockfile. Pages v3 does not document an NPM_VERSION override: npm normally follows the chosen Node version, so the command selects the pinned npm release explicitly. The docs command installs its Python lockfile and reads canonical assets from the checked-out sibling packages/brand directory; it does not need Node.
Include website watch paths apps/web/*, packages/*, package.json, package-lock.json, .nvmrc, tsconfig.json, eslint.config.js and wrangler.toml. Include docs watch paths docs/* and packages/brand/*. Cloudflare's wildcard * matches nested path separators. Enable preview branches for review. Do not run the optional API deployment from either Pages build.
Domains and canonical redirect¶
The main website is www.cwtchconsulting.com. Documentation is docs.cwtchconsulting.com.
- Inspect the existing Cloudflare account, zone and DNS records for
cwtchconsulting.com. Preserve unrelated records and existing services. - Connect the organisation repository to both named Pages projects and verify a successful production build and its
pages.devURL. - Attach both
www.cwtchconsulting.comandcwtchconsulting.comthrough the website project's Custom domains settings. Both usecwtch-consulting-web.pages.devas their CNAME target; Cloudflare flattens the apex record. - Attach
docs.cwtchconsulting.comthrough the docs project's Custom domains settings, usingcwtch-consulting-docs.pages.dev. - Keep the zone's Single Redirect rule cwtch-consulting - apex to www active with the settings below.
- Confirm active custom domains and certificates, then verify HTTPS, asset requests, navigation, search, docs 404 responses and both colour modes on the live domains.
| Redirect setting | Value |
|---|---|
| Match expression | (http.host eq "cwtchconsulting.com") |
| Dynamic target | concat("https://www.cwtchconsulting.com", http.request.uri.path) |
| Status code | 301 |
| Preserve query string | Enabled |
The rule covers HTTP and HTTPS requests to the apex and preserves their path and query string. It does not match the www or docs subdomains. The website's canonical link points to https://www.cwtchconsulting.com/; MkDocs site_url is https://docs.cwtchconsulting.com/. These metadata settings do not create DNS records or attach custom domains.
Optional Worker¶
The optional starter is named cwtch-consulting-api. Its code and Wrangler configuration live in services/api. It has no production domain or route until a backend is required and the deployment is configured.
npm run deploy --workspace=@cwtch/api -- --dry-run
A real npm run deploy --workspace=@cwtch/api requires the correct authenticated account. Keep account IDs, bindings and secrets out of guesses and never put a Cloudflare API token into browser code or committed configuration.
Deployment status¶
Both Git-connected Pages projects were deployed successfully from main on 30 September 2026. Initial production deployments used commit 8995731eddc1dd4fab0695597bc64f5f7ab95678:
| Project | Initial successful deployment |
|---|---|
| Website | 57cc8bd9 |
| Documentation | 0d39d1e0 |
The build settings and watch paths above are configured in Cloudflare. Production builds run from main; the Cloudflare GitHub app is scoped to this repository.
Live verification confirmed HTTPS responses from both primary domains, a permanent apex-to-www redirect preserving paths and query strings, working documentation navigation and search, docs 404 handling, Vivid/Muted controls and preference persistence, and successful requests for the supplied fonts, logos and icons. The optional API Worker has not been deployed.
See the official Pages monorepo guide, build configuration, build image, and custom domains. Settings were checked on 30 September 2026 against Cloudflare's published GitHub sources for the v3 toolchain, build-image controls, monorepos and custom domains. Recheck account-specific settings before changing these deployments.