---
title: Build and deployment
description: Build a static release and deploy it to your hosting provider.
sidebar:
  order: 10
---

Brandtree builds a static website. A host serves the HTML, CSS, JavaScript,
images, fonts, and downloads from `dist/`; it does not need a running Brandtree
or Astro server. Astro's [deployment guide](https://docs.astro.build/en/guides/deploy/)
explains the general static hosting model. Brandtree owns the Astro config, so
use its commands rather than adding an adapter to generated files.

## Prepare production settings

Set `brand.meta.url` in `brandtree.config.ts` to your production origin. Brandtree
uses it for canonical URLs, alternate-language links, and absolute social-image
URLs. Do not ship the example brand's URL or a localhost address.

Use `basePath` only when intentionally mounting the guidelines at a route such
as `/guidelines`. It changes generated routes; it is not an Astro deployment
`base` option and does not rewrite every hand-authored URL. See
[navigation](/navigation) and test your actual host's path arrangement.

Replace sample artwork and photography, confirm font/image licenses, and add the
final download files to `public/`. Check that download URLs point to actual files;
a labelled download exhibit does not create the archive for you.

Pages are indexable by default. For a page that should be omitted from search
results, set frontmatter `noindex: true` or `seo.noindex: true`. This emits crawler
metadata; it is not access control. Put confidential guidelines behind host-level
authentication if they require private access.

## Build a reviewed release

Follow [Validation](/validation) to run strict checking, build, and inspect the
static output. Run `pnpm build` using the script created by init, or invoke
`pnpm brandtree build` directly. Stop development before building because it
shares the generated runtime.

Upload the contents of your project’s `dist/`. The
`.brandtree/` directory contains generated source, not the release artifact.

## Use a static host

Point your host at your Brandtree project directory, where `package.json` and
`brandtree.config.ts` live. For a project using pnpm and the generated scripts:

| Setting           | Value                            |
| ----------------- | -------------------------------- |
| Install command   | `pnpm install --frozen-lockfile` |
| Build command     | `pnpm build`                     |
| Publish directory | `dist`                           |

Use Node.js 22.12 or newer. Commit `package.json` and your lockfile so CI installs
the same Brandtree version and author dependencies. With npm or Bun, use the
corresponding install and build commands for your lockfile.

The site contains real generated nested routes. Preserve them and the emitted
asset directories when uploading. Configure your host to serve directory index
files, and test a direct visit and refresh on a nested URL after deployment.
A single-page-app fallback is unnecessary for this static output.

## Publish the static output

Use your host's deployment workflow to publish `dist/`. Brandtree does not have
a `deploy` subcommand or require a particular provider. If your host supplies a
CLI, install and configure it in your own project; deployment credentials and
access are managed by the host.

## A repeatable release routine

Keep config, content, assets, and the dependency lockfile in version control.
For each release, install dependencies, run strict checking, build, inspect the
output, then deploy that exact output. CI should stop when either check or build
fails. After deployment, verify representative public URLs and download links.
Retain your previous deployed artifact or commit so you can restore a known release.
