Skip to content

Deploying documentation ​

The docs site lives in docs/ and is built with VitePress.

Local development ​

bash
vp install
vp run docs:dev      # http://localhost:5173/
vp run docs:build    # static output → docs/.vitepress/dist
vp run docs:preview  # preview production build

Cloudflare Pages ​

The VitePress config uses base: "/" for a Cloudflare Pages project named mastra-effect at https://mastra-effect.pages.dev.

bash
vp run docs:build
vp run docs:deploy   # wrangler pages deploy docs/.vitepress/dist --project-name=mastra-effect

Requires Wrangler and a Cloudflare account. Authenticate with wrangler login or set CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID.

SettingValue
Build commandvp run docs:build
Output directorydocs/.vitepress/dist
Node version22+

GitHub Actions: .github/workflows/docs-pages.yml deploys on pushes to main when CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID repository secrets are configured.

Other static hosts ​

If the site is served from a subpath (for example GitHub Pages project sites), set base in docs/.vitepress/config.ts to that path (for example "/mastra-effect/").

Library development ​

This monorepo uses Vite+ for formatting, linting, type-checking, tests, and library builds.

bash
vp install
vp check                 # format + lint + type-check
vp run -r typecheck      # include compile-time type tests
vp run -r test
vp run -r build          # vp pack in each package

Package builds use vp pack (tsdown) instead of bare tsc emit. VitePress remains the docs toolchain.

Publishing 0.0.1 ​

Do not publish from this repo without an npm token. When ready:

bash
vp install
vp check
vp run -r typecheck
vp test
vp run -r build
vp run docs:build
pnpm -r publish --access public --no-git-checks   # after npm login

Checklist:

  • [ ] Both packages at 0.0.1, not private
  • [ ] peerDependencies use semver ranges (no workspace: in packed manifests — CI verifies)
  • [ ] Tarballs contain dist/ and src/ with .d.ts.map files for IDE go-to-definition (CI verifies)
  • [ ] Docs site matches main (vp run docs:build)
  • [ ] CHANGELOG.md entry for the release