Anydocs Documents
Deployment

Deploy to Static Hosting

Publish the static output instead of relying on platform-specific repo scripts.

The public output of Anydocs is a static site, so deployment is not about a special platform script. The real workflow is: build the public artifacts, then hand the output directory to any static host. Think of deployment as publishing the result of `build`, not exposing Studio or the source repository directly.

Steps

  1. Build the public artifacts first
  2. Check that the output directory is complete
  3. Hand the whole output directory to a static host
  4. Verify the public boundary after go-live

Build the public artifacts first

Run `build` from the docs project root. If you omit `--output`, artifacts are written to the project's default `dist/` directory. You can also write to a dedicated directory for CI or host uploads.

npx @anydocs/cli build ./my-docs-project
npx @anydocs/cli build ./my-docs-project --output ./build

Check that the output directory is complete

Before publishing, confirm the output contains the site entry, language directories, static asset directory, and public machine-readable outputs such as `llms.txt`, `search-index.<lang>.json`, and `mcp/`. Missing files usually point to page status, language configuration, or build-input problems.

build/
  index.html
  _next/
  zh/
  en/
  llms.txt
  search-index.zh.json
  mcp/

Hand the whole output directory to a static host

Whether you use Nginx, Apache, Vercel, Netlify, Cloudflare Pages, GitHub Pages, or object storage, the core action is the same: upload or copy the built output directory, not the source docs project. On traditional servers this usually means syncing the output into the static site root.

cp -r ./build/* <your-static-site-dir>/

Verify the public boundary after go-live

After deployment, check the default-language landing page, a few published pages, search, `llms.txt`, and the `mcp/` resources. Also confirm that draft and in-review pages are not exposed. If a page is missing in local preview too, inspect its page status before blaming the hosting platform.

Suitable platforms: Common static hosts include Nginx / Apache, Vercel, Netlify, Cloudflare Pages, GitHub Pages, AWS S3, and OSS.
Do not deploy source files: The deployment target should be the built output directory, not the source project containing `pages/`, `navigation/`, Studio code, or local authoring interfaces.