Repository navigation
ci: plain cf deploy + Worker Previews - #2
Merged
Merged
Conversation
Workers Builds now generate then `cf deploy` / `cf previews deploy`, matching poim and 1000-observations. Local deploy/preview:deploy scripts follow the same path. Co-authored-by: froQ <sayhola@froq.me>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
ui | d70f027 | Oct 12 2026, 12:50 PM |
Workers Builds sets WORKERS_CI, which otherwise makes Nitro pick cloudflare-module. Pin nitro.preset to static. List nuxt as a docs peer so cf at the workspace root does not run pnpm nuxt build and instead bundles dist/. Co-authored-by: froQ <sayhola@froq.me>
0froq
marked this pull request as ready for review
October 12, 2026 12:49
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
|
0froq
added a commit
that referenced
this pull request
Oct 15, 2026
PR #4 moved nuxt back into docs dependencies. cf deploy at the monorepo root then runs `pnpm nuxt build`, but nuxt is not on the root PATH. Restore the peerDependency pattern from #2 so generate stays in docs and cf bundles ./dist via Wrangler after Workers Build runs pnpm generate. Co-authored-by: Cursor Agent <cursoragent@cursor.com>
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.
Workers Builds can use the same flow as 0froq/poim#5 and 0froq/1000-observations: generate the Nuxt static docs site, then let
cfbundle and deploy (including Worker Previews). Removedwrangler build --experimental-new-config --x-cf-build-outputandcf deploy --prebuilt.cloudflare.config.tsandwrangler.config.tsare unchanged (Worker nameui,assetsDirectory: ./dist,htmlHandling: drop-trailing-slash,notFoundHandling: 404-page). Library source is unchanged.This repo is a pnpm workspace (
docs/is Nuxt). Two extra deploy-only fixes so dashboardpnpm exec cf deploydoes not take the Nuxt autoconfig path:docs/nuxt.config.tspinsnitro.preset: 'static'. Workers Builds setsWORKERS_CI; without the pin,pnpm generateloggedNitro preset: cloudflare-moduleand wrotedist/server/.docslistsnuxtas apeerDependenciesentry.cfat the workspace root otherwise detects Nuxt indocs/and runspnpm nuxt build(nuxt is not a root binary). With the peer,cf deployuses the Wrangler bundler againstdist/. pnpm still auto-installs the peer;nuxt generate/nuxt preparestill work.Dashboard commands (need to be set in Workers Builds)
These builds still ran the old dashboard commands, so Worker Previews failed. The repo no longer has a
--prebuiltpath.22pnpm generatepnpm exec cf deploypnpm exec cf previews deployLocal equivalent:
pnpm deploy→pnpm generate && cf deploy.preview:deployispnpm generate && cf previews deploy.Verification
Local (Node v22.22.2;
WORKERS_CI=1 CI=1for generate)pnpm generate— Nitrostatic;dist/index.html,dist/404.html,dist/_headers. No_worker.js/_routes.json/_redirects/dist/server.pnpm exec cf deploy --dry-run(no--prebuilt) — pass. Wrangler bundler; 532 asset files; Total Upload 0.00 KiB / gzip 0.02 KiB (assets-only Worker); no bindings.worker.config.jsonhasname: "ui",htmlHandling: "drop-trailing-slash",notFoundHandling: "404-page".cf previews deploy --dry-run— no such flag (cf 1.0.0-beta.12).pnpm check(lint + typecheck + token contract) — pass.GitHub Actions
checkond70f027— pass.Workers Builds Preview (
d70f027, build804e7155)static,Success: Build command completed.pnpm generate && pnpm exec wrangler build --experimental-new-config --x-cf-build-outputthenpnpm exec cf previews deploy --prebuilt.Build Output was not created by a Preview build.Same reason poim dropped--prebuilt.Not verified: a production
cf deployto the live Worker. The GitHub Preview comment still does not include a URL; that is expected withcf previews deploy(URL is in build logs).