Skip to content

chore(propel-docs): set up Cloudflare Workers static-assets deploy#234

Merged
sriramveeraghanta merged 2 commits into
mainfrom
feat/propel-docs-cloudflare-deploy
Jul 16, 2026
Merged

chore(propel-docs): set up Cloudflare Workers static-assets deploy#234
sriramveeraghanta merged 2 commits into
mainfrom
feat/propel-docs-cloudflare-deploy

Conversation

@sriramveeraghanta

Copy link
Copy Markdown
Member

What

Makes apps/propel-docs ready to deploy on Cloudflare Workers (Static Assets), driven by Cloudflare's Git integration (Workers Builds) — no GitHub Actions workflow. Mirrors the conventions already used for the Storybook deploy in packages/propel/wrangler.jsonc.

Changes

apps/propel-docs/wrangler.jsonc

  • Enable workers_dev + preview_urls → every non-production branch/PR build gets its own preview URL.
  • Set assets.not_found_handling: "404-page" — correct for a multi-page static site. (Storybook uses single-page-application because it is a SPA; here that would wrongly return 200 for every bad path.)
  • Drop the account_id TODO — the account comes from the connected Cloudflare account, not this file.
  • Leave a clear TODO for the custom-domain routes entry + Astro site once a domain is assigned.

apps/propel-docs/src/pages/404.astro (new)

  • So "404-page" handling has a real dist/404.html to serve. Uses the site's BaseLayout + design tokens.

Verification

  • vp run @makeplane/propel-docs#build → clean, 9 pages, dist/404.html emitted.
  • astro check → 0 errors / 0 warnings / 0 hints.
  • vp check → changed files format-clean.

Deploying (Cloudflare Workers Builds dashboard)

vp is a local dependency, so pnpm exec vp works in Cloudflare's build image (no global install needed):

Setting Value
Production branch main
Root directory repo root (/) — build packs @makeplane/propel from the workspace first
Build command pnpm exec vp run @makeplane/propel-docs#build
Deploy command pnpm exec wrangler deploy --config apps/propel-docs/wrangler.jsonc

Currently workers.dev-only; add the custom-domain route + set site once a domain is assigned.

@makeplane/propel-docs is private, so no changeset is needed (the release flow only publishes @makeplane/propel).

Configure apps/propel-docs for deployment on Cloudflare Workers (Static
Assets), driven by Cloudflare's Git integration (no GitHub Actions):

- wrangler.jsonc: enable workers.dev + per-version preview URLs, set
  not_found_handling to "404-page" (correct for a multi-page static site,
  unlike the SPA fallback Storybook uses), and drop the account_id TODO
  (the account comes from the connected Cloudflare account, not config).
  Left a TODO for the custom-domain route + astro `site` once a domain
  is assigned.
- Add src/pages/404.astro so "404-page" handling has a real dist/404.html
  to serve, styled with the site's BaseLayout + design tokens.
Copilot AI review requested due to automatic review settings July 16, 2026 13:31
@github-actions

Copy link
Copy Markdown

📚 Storybook preview: https://pr-234-propel-storybook.vamsi-906.workers.dev

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Prepares apps/propel-docs for deployment to Cloudflare Workers (Static Assets) via Cloudflare’s Git integration (Workers Builds), aligning configuration with the existing Storybook Workers deploy approach in the repo.

Changes:

  • Updated apps/propel-docs/wrangler.jsonc to enable workers_dev + preview_urls and set assets.not_found_handling to "404-page" for a multi-page static site.
  • Added an Astro 404 page (apps/propel-docs/src/pages/404.astro) so the build emits a real 404 page for Cloudflare to serve.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
apps/propel-docs/wrangler.jsonc Configures Cloudflare Workers Static Assets deployment (workers.dev + preview URLs, 404 handling).
apps/propel-docs/src/pages/404.astro Adds a styled 404 page so "404-page" handling can serve dist/404.html.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/docs/wrangler.jsonc
Comment on lines +16 to +18
// TODO: once a production domain is assigned, add a custom-domain route here and set
// `site` in astro.config.mjs to match (so the sitemap emits absolute URLs). Mirror
// packages/propel/wrangler.jsonc's storybook route, e.g.:
Integrate the Vite+ -> Turborepo toolchain migration (#235), which also
renamed apps/propel-docs -> apps/docs.

Conflicts resolved:
- apps/docs/wrangler.jsonc: kept the Cloudflare Workers static-assets deploy
  config from this branch (workers_dev + preview_urls, not_found_handling
  '404-page', no account_id — driven by Cloudflare Git integration). Worker
  name kept as 'propel-docs' to mirror the 'propel-storybook' sibling (CF
  worker names are account-global), dropping main's stale account_id TODO.
- apps/docs/src/pages/404.astro: relocated from the old apps/propel-docs path
  into the renamed apps/docs tree.

Validated on the merged Turborepo toolchain: pnpm install (up to date),
turbo build --filter=docs (astro check 0 errors; dist/404.html generated),
check:format + check:lint clean.
@sriramveeraghanta
sriramveeraghanta merged commit a1b69d2 into main Jul 16, 2026
2 checks passed
@sriramveeraghanta
sriramveeraghanta deleted the feat/propel-docs-cloudflare-deploy branch July 16, 2026 20:40
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.

3 participants