chore: deploy static docs via docs-router-prod (R2 + KV) instead of CF Pages - #6635
Open
thesandlord wants to merge 1 commit into
Open
chore: deploy static docs via docs-router-prod (R2 + KV) instead of CF Pages#6635thesandlord wants to merge 1 commit into
thesandlord wants to merge 1 commit into
Conversation
…F Pages Co-Authored-By: sandeep.dinesh <sandeep.dinesh@postman.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Switches "Deploy Static Docs" from the container's Cloudflare Pages deploy to the docs-router publish path: the built
dist/goes to thefern-docs-staticR2 bucket as an immutable build, and thedocs-router-prodWorker'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:
CLOUDFLARE_API_TOKENkeeps 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 tofern-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:latestimage 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