Publish docs with Cloudflare Pages
The docs site is a static Astro/Starlight project in docs-site/. Deploy it with Cloudflare Pages, not a Worker or Tunnel. Pages serves the generated files; it does not host or change the SDK’s npm package registry.
Create the Pages project
Section titled “Create the Pages project”- In Cloudflare, open Workers & Pages → Create application → Pages → Connect to Git.
- Authorize the Cloudflare GitHub app to access
Social-Pulse-CRM/Crawler, which is a private repository. - Select
mainas the production branch. - Set the root directory to
docs-site, the build command tonpm run build, and the build output directory todist. - Keep Protect with Cloudflare Access disabled so the documentation remains public. Preview deployments may be enabled.
- Deploy once to the generated
*.pages.devaddress and check the site before adding the custom domain.
The docs-site directory must exist in the Git commit Cloudflare clones. If the build reports Cannot find cwd: .../docs-site, the configured root directory is missing from that branch/revision. Commit and push the site first, then retry. Do not use the Workers build form with npx wrangler deploy; it requires a Worker configuration and is not the static Pages build.
Attach docs.bug-fence.com
Section titled “Attach docs.bug-fence.com”- In the Pages project, open Custom domains → Set up a domain and enter
docs.bug-fence.com. - If the
bug-fence.comzone is active in the same Cloudflare account, follow the Pages prompt to create/verify thedocsCNAME. If DNS is hosted elsewhere, create the exact CNAME target Pages displays at the authoritative DNS provider. - Do not change the apex (
bug-fence.com) DNS records or nameservers for this subdomain. - Wait for the domain to validate and the TLS certificate to become active; then confirm
https://docs.bug-fence.com/loads and the sitemap andllms.txtare reachable.
Remove only the Pages custom-domain binding and the docs CNAME to roll back. Leave the marketing site’s DNS records untouched.