Skip to content

fix(docs): configure production Workers deployment - #226

Merged
HsiangNianian merged 2 commits into
mainfrom
docs/workers-production
Oct 21, 2026
Merged

HsiangNianian merged 2 commits into
mainfrom
docs/workers-production

Conversation

@HsiangNianian

@HsiangNianian HsiangNianian commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Deploy documentation from main to the Hydroroll Cloudflare account and document the Workers Builds branch, path filters, and pinned build tools.

Disable Wrangler function-name helpers because the serialized theme bootstrap otherwise throws __name is not defined in the browser and causes hydration errors.

Validation: pinned pnpm frozen install, documentation build/typecheck, Wrangler deployment dry run, and pre-commit checks passed. Browser checks against the local Workers runtime pass with no JavaScript errors, working search, and light/dark theme switching.

Summary by Sourcery

Configure reliable production Workers deployments for the documentation site and prevent browser hydration failures in the generated Worker bundle.

Bug Fixes:

  • Prevent hydration errors in the documentation site by disabling Wrangler function-name helpers during Worker bundling.

Enhancements:

  • Document the production Cloudflare Workers deployment configuration, including the production branch, path filters, pinned build tools, and secret handling.

Build:

  • Standardize documentation deployment validation on a frozen workspace install and update the deployment configuration.

Deployment:

  • Configure production documentation deployments from the main branch to the Hydroroll Cloudflare account through Workers Builds.

Documentation:

  • Update Cloudflare deployment guidance with Workers Builds settings, deployment triggers, and pinned runtime versions.

Copilot AI balanced review requested due to automatic review settings October 21, 2026 03:05
@sourcery-ai

sourcery-ai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Configures the documentation Worker for production Cloudflare Workers Builds from main, documents its build and trigger settings, and aligns local validation with the pinned pnpm workflow.

File-Level Changes

Change Details Files
Documents and configures the production Cloudflare Workers deployment for the documentation site.
  • Pins the deployment to the Hydroroll Cloudflare account, repository, main branch, and dropout Worker.
  • Documents root-directory build settings, empty build command, deploy command, workspace build behavior, runtime versions, and watched paths.
  • Clarifies that deployment credentials remain in the Cloudflare connection rather than the repository or GitHub Actions.
  • Updates local validation to use frozen installation and retains the pinned Wrangler manual deploy flow.
docs/cloudflare-deployment.md
wrangler.jsonc

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

📦 Semifold release plan

Plan calculated through commit 858cbdb.

Note

This pull request does not introduce any changesets.

After this pull request is merged into main, the release workflow will run and publish any prepared package versions that are not yet available in their registry.

This comment updates automatically as the pull request changes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are narrowly scoped, align with the existing deployment configuration, and have no identified blocking issues.

No open issues 🎉

What changed in this PR

Pins the documentation Worker to the Hydroroll Cloudflare account and documents production deployment using the existing workspace build.

Changes:

  • Set the Worker’s Cloudflare account ID.
  • Document main deployment settings, watched paths, and secret handling.
  • Use frozen dependency installation for deployment validation.
File Description
wrangler.jsonc Pins the documentation Worker’s Cloudflare account.
docs/​cloudflare-deployment.md Documents production settings and updates validation commands.

Review effort: Balanced

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Needs a human reviewer. The new account_id directs Wrangler deployments to a Cloudflare account; if it points to the wrong account and the build token can deploy there, the deployment could publish the Worker in the wrong place or disrupt the intended production deployment. Reverting the config does not undo an already-published deployment; it would need a corrective deployment.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Disable Wrangler name helpers so serialized theme scripts run in the browser without __name errors.

Reviewed-by: GPT-6
@HsiangNianian HsiangNianian self-assigned this Oct 21, 2026
@HsiangNianian HsiangNianian changed the title ci(docs): configure main Workers deployment fix(docs): configure production Workers deployment Oct 21, 2026
@HsiangNianian
HsiangNianian merged commit 53872df into main Oct 21, 2026
21 checks passed
@HsiangNianian
HsiangNianian deleted the docs/workers-production branch October 21, 2026 03:23
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.

2 participants