Deploy Notes
Use this document when deployment behavior or CI build commands are involved.
Expected deploy targets
This repository is structured so that at minimum these artifacts are deployable:
- docs site from
apps/docs - widgets app from
apps/playground - template app from
templates/grist-widget-template-vite
Cloudflare Pages (3 projects)
Recommended setup is one Pages project per target:
docsprojectwidgetsprojecttemplatesproject
The safest default is:
- set Root directory to repository root
- use
pnpm --filter ...commands with real workspace names - set Build output directory to a path relative to repository root
docs project
- Build command:
bash
pnpm install --frozen-lockfile && pnpm --filter docs docs:build- Build output directory:
text
apps/docs/.vitepress/distwidgets project
Use this command even if widgets currently builds without importing core directly. It prevents future breakages once widgets starts using @grist-widget-sdk/core.
- Build command:
bash
pnpm install --frozen-lockfile && pnpm --filter @grist-widget-sdk/core build && pnpm --filter playground build- Build output directory:
text
apps/playground/disttemplates project
Template code imports @grist-widget-sdk/core, so core must be built first.
- Build command:
bash
pnpm install --frozen-lockfile && pnpm --filter @grist-widget-sdk/core build && pnpm --filter grist-widget-template-vite build- Build output directory:
text
templates/grist-widget-template-vite/distCommon Cloudflare errors and fixes
No projects matched the filters: the--filtervalue does not matchpackage.json:name.Output directory ".../.../dist" not found: Root directory + output path are duplicated. If Root is alreadyapps/playground, output should bedist(notapps/playground/dist).Cannot find module '@grist-widget-sdk/core': build@grist-widget-sdk/corefirst in the same command chain.No Wrangler configuration file foundandNo functions dir at /functions found: expected for static Pages deployments.
Build commands (workspace-safe)
From repository root:
bash
pnpm buildPer workspace:
bash
pnpm --filter docs docs:build
pnpm --filter playground buildBuild ordering guarantees
turbo.json uses:
build.dependsOn: ["^build"]test.dependsOn: ["^build"]
This ensures dependent apps build against freshly built upstream workspace packages such as @grist-widget-sdk/core.
Static hosting notes
apps/playground/public/_redirectsenables SPA fallback routing for static hosting.apps/docsoutputs static docs from VitePress to.vitepress/dist.
Agent checklist before touching deploy config
- Confirm workspace/package names still match commands.
- Confirm output paths used by hosting provider still match build output.
- Confirm no deploy instructions reference removed directories.