Skip to content

docs: give the Previews Base its own build settings in Deploying - #8

Merged
rqbazan merged 1 commit into
mainfrom
docs/preview-builds
Oct 18, 2026
Merged

rqbazan merged 1 commit into
mainfrom
docs/preview-builds

Conversation

@rqbazan

@rqbazan rqbazan commented Oct 18, 2026

Copy link
Copy Markdown
Member

Summary

The "Workers Builds: variablelab-www" check failed on every new branch. Workers Builds copies the Previews Base build settings into a new branch's trigger, and that base had no build command. So npx wrangler preview ran with no dist/.

The base is now fixed in the account, not in this repo: PATCH /accounts/{account_id}/builds/workers/{worker_tag}, with production_settings unchanged byte for byte.

 previews_base_config
-  build_command: ""
+  build_command: "pnpm exec astro build"
-  environment_variables: {}
+  environment_variables: { NODE_VERSION: "24" }
   deploy_command: "npx wrangler preview"

This PR updates README.md#deploying to match:

  • It lists both sets of build settings, Production and Previews Base.
  • It corrects two claims. wrangler preview does run build.command, which stays out of wrangler.jsonc so a build doesn't run Astro twice. And Workers Builds reads neither mise.toml nor mise.lock.
  • It separates the build Previews Base from the runtime one.
  • It shows how a branch with a / becomes its Preview URL.

Evidence

  • Before (ci: add Dependabot security updates and a weekly dependency audit #6, ci/deps-security): trigger build_command: ""
    Executing user deploy command: npx wrangler preview
    ✘ [ERROR] The directory specified by the "assets.directory" field in your configuration file does not exist: /opt/buildhome/repo/dist
    
    After (throwaway ci/preview-base-test, pushed after the PATCH, then deleted): trigger build_command: "pnpm exec astro build", NODE_VERSION=24
    Installing nodejs 24.22.0
    Executing user build command: pnpm exec astro build
    Preview URL: https://ci-preview-base-test-variablelab-www.raquirozbazan.workers.dev   → 200
    
    This PR's own Workers Builds check passed the same way.
  • Claims the README now makes, tested on a throwaway branch:
    • With build.command in wrangler.jsonc, wrangler preview logged [custom build] Running: pnpm exec astro build.
    • With mise pinned to node = "24.20.0", Workers Builds still detected nodejs@24.21.0, the image's default.
    • Deleting a branch deleted its trigger and its Preview within seconds.

Merge Danger

Door: two-way

Docs only. You can revert the account change with the same PATCH: set build_command back to "" and environment_variables to {}.

Blast Radius: none

Production deploys are unchanged. Branches pushed before the PATCH keep their old trigger, but none are open.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DbUmufsTzLnGp4dve7NYP7

Workers Builds copies the Previews Base into each new branch's trigger.
Its build command was empty, so every branch's npx wrangler preview ran
without dist/ and failed. The base now has the production build command
and NODE_VERSION, and Deploying lists both sets of settings.

It also corrects two claims: wrangler preview does run build.command (it
stays out of wrangler.jsonc so a build doesn't run Astro twice), and
Workers Builds reads neither mise.toml nor mise.lock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbUmufsTzLnGp4dve7NYP7
@changeset-bot

changeset-bot Bot commented Oct 18, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 19ad516

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@cloudflare-workers-and-pages

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://docs-preview-builds-variablelab-www.raquirozbazan.workers.dev (commit 19ad516)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://27bc857e-variablelab-www.raquirozbazan.workers.dev 19ad516 2026-10-18T00:06:28.303Z Visit the dashboard ↗

@rqbazan
rqbazan merged commit 037d9e1 into main Oct 18, 2026
6 checks passed
@rqbazan
rqbazan deleted the docs/preview-builds branch October 18, 2026 00:07
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