Build
Deployment
Build and deploy to Cloudflare Pages
Build
npm run build
Output: .vitepress/dist/. Static HTML, CSS, JS. Ensure .env is set for the target site (SITE_NAME or SITE_SLUG) before building.
Cloudflare Pages
Deploy with wrangler. The template includes @cloudflare/vite-plugin. Site settings (domain, cloudflareAccountId) drive deployment config.
Configure scripts
configure-site.ts— Reads Payload site config, writes wrangler configconfigure-local-site.ts— Reads local site settings (sites/{name}/settings.ts), writes wrangler config
Use these to generate wrangler.toml or equivalent for your deployment pipeline.
Next: PageData Reference