# Deploy Docusaurus

Docusaurus is detected from its dependency and `docusaurus.config.js`, and deploys as a static site: `npm run build` fills `build/`, and the CDN serves it with [free bandwidth](/billing/pricing#static-sites). The usual docs-site setup - versioned docs, blog, search plugins - is all just build output.

## Build

- **Output directory:** `build` - override in [Build settings](/create/build-settings#output-directory) if your config moves it.
- **Install:** follows your lockfile - see [How detection works](/platform/frameworks#how-detection-works).
- Set `url` in `docusaurus.config.js` to your [custom domain](/platform/custom-domains) so canonical URLs and sitemaps come out right.

## Previews for docs reviews

Every branch gets its own [preview environment](/platform/preview-environments) - a docs change can be reviewed rendered, at its own URL, before it merges. This is the whole preview workflow at its most useful.

## Broken links fail loudly

Docusaurus checks internal links during the build; a broken link can fail it. That failure lands in the [build logs](/platform/observability#build-logs) with the offending lines extracted - fix and push.

## Related

- [Preview environments](/platform/preview-environments): A rendered preview per branch.
- [Build settings](/create/build-settings): Install, build, and output configuration.
- [Custom domains](/platform/custom-domains): Your docs on your own hostname.
