Skip to content

chore: deploy static docs via docs-router-prod (R2 + KV) instead of CF Pages - #6635

Open
thesandlord wants to merge 1 commit into
mainfrom
devin/1786663822-deploy-via-docs-router
Open

chore: deploy static docs via docs-router-prod (R2 + KV) instead of CF Pages#6635
thesandlord wants to merge 1 commit into
mainfrom
devin/1786663822-deploy-via-docs-router

Conversation

@thesandlord

Copy link
Copy Markdown
Contributor

Summary

Switches "Deploy Static Docs" from the container's Cloudflare Pages deploy to the docs-router publish path: the built dist/ goes to the fern-docs-static R2 bucket as an immutable build, and the docs-router-prod Worker's KV pointer is flipped at it. Going live is that single KV write, so the swap is atomic and a rollback is the same write aimed at an older build id.

The container picks the path off the env, so this is a swap of three vars:

-CF_PAGES_PROJECT / CF_PAGES_BRANCH        # legacy: wrangler pages deploy dist
+FERN_DOCS_STATIC_BUCKET: fern-docs-static # → sync-dist --build-id + KV pointer flip
+CLOUDFLARE_R2_ACCESS_KEY_ID / CLOUDFLARE_R2_SECRET_ACCESS_KEY

CLOUDFLARE_API_TOKEN keeps its role (now the KV pointer write rather than the Pages upload); R2 uploads are S3-signed, so they need their own key pair — hence the two new secrets, which must be created (R2 → Manage R2 API Tokens, Object Read & Write scoped to fern-docs-static) before the next run.

Container-side implementation: https://github.com/fern-api/fern-platform/pull/13948. That PR must merge and the fernenterprise/docs-static-build:latest image must be rebuilt before this workflow's new env has any effect — until then the added vars are inert and the build still deploys to Pages.

Link to Devin session: https://app.devin.ai/sessions/9924a72b0e59409a90883d7868a4e6b4
Requested by: @thesandlord

…F Pages

Co-Authored-By: sandeep.dinesh <sandeep.dinesh@postman.com>
@thesandlord
thesandlord requested a review from devalog as a code owner August 13, 2026 23:31
@thesandlord thesandlord self-assigned this Aug 13, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@github-actions

Copy link
Copy Markdown
Contributor

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