Kura Docs
Advanced

Cloudflare Workers

To publish the site to Cloudflare Workers, run:

kura deploy

kura deploy freezes your content and search index, builds a portable Worker bundle, and ships it to Cloudflare. The bundle is filesystem-free, so it runs directly on edge nodes — and the same codebase deploys to Vercel or Deno Deploy with a one-line june.config.ts change.

To point a custom domain at the Worker, set it in june.config.ts:

export default defineJune({
  // …
  deploy: { target: "workers", name: "my-docs", domain: "docs.example.com" },
});

The default target. kura deploy produces a Worker bundle and uploads it; a domain becomes a Workers custom domain.

Continuous deployment

kura deploy is the same command everywhere — run it from your machine or any CI (GitHub Actions, a container, etc.) and it builds and ships in one step. Nothing platform-specific to configure.

If you instead wire up Cloudflare's Git integration (Workers Builds — Cloudflare builds and deploys on every push), split the two steps:

  • Build command: npm run build
  • Deploy command: npx wrangler deploy -c dist/wrangler.jsonc
  • Node version: the scaffold ships an .nvmrc pinning Node 24 — the build imports a generated .ts module, which needs Node's type stripping (≥ 22.18).

kura build writes the Worker config to dist/wrangler.jsonc, so the deploy step points wrangler at it. Leave the project root unchanged — only the deploy step looks into dist/.

Search on the edge

Out of the box, search is a lexical scan — a zero-dependency match that runs anywhere, including Workers, with nothing to provision. The scaffold ships --no-embed on every script (kura deploy --no-embed), so a new site installs clean and deploys to the edge with no embedder to configure.

To upgrade to semantic search, install @kurajs/transformers, add an embedder to kura.config.ts, and drop --no-embed from your scripts. kura deploy then embeds your docs at build time (locally, via Xenova/bge-m3) and freezes the vectors into the Worker bundle. Serving semantic queries at the edge needs a runtime embedder to embed the query — Cloudflare Workers AI support (workersAI(), @cf/baai/bge-m3) is on the roadmap.

One codebase, from local to the edge: a zero-setup lexical scan is the default, and semantic search is a drop-in upgrade — so a missing embedder is never a deployment blocker.