archidocs build
Write the static viewer site with the Workspace’s Bundle and past Revisions, or a PR preview site.
archidocs build [--out <dir>] [--bundle-only] [--keep <n|all>]archidocs build --preview [--base <branch>] [--out <dir>]Examples
Section titled “Examples”Write the viewer, the latest Bundle and the past Revisions’ Bundles into site/, ready for any static host.
archidocs build --out siteKeep Bundles for the latest 50 past Revisions only, and for every tagged one.
archidocs build --out site --keep 50Write only public/workspace.bundle.json, for mcp --bundle or a script to read.
archidocs build --bundle-only --out publicWrite a PR preview site that opens on Compare, from origin/main to the pull request checked out.
archidocs build --preview --base main --out preview--out <dir> · Default: dist.
The folder to write the site, or the Bundle, into.
--bundle-only
Section titled “--bundle-only”--bundle-only · Off by default.
Write only workspace.bundle.json, without the viewer or past Revisions.
--keep
Section titled “--keep”--keep <n|all> · Default: 200.
How many of the latest past Revisions the site keeps Bundles for, or all; tagged Revisions are always kept.
--preview
Section titled “--preview”--preview · Off by default.
Build a PR preview site holding just the PR head and the base branch’s latest Revision, for Compare.
--base
Section titled “--base”--base <branch> · Default: the branch origin/HEAD points at.
With --preview: the base branch, read from origin/<branch> without fetching.
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 |
The site, the Bundle or the preview site was written. |
1 |
The Workspace has errors. They are printed as check prints them, and nothing is written. |
2 |
It could not run: an unknown flag, a flag missing its value, flags that don’t go together, a --keep that is not a count or all, no Workspace found, or with --preview a Workspace outside git or a base branch that is not in the checkout. |
Exit 2 prints the reason to stderr as archidocs: <message>, and after most mistakes in the command line, the usage summary.
See also
Section titled “See also”- Publish to GitHub Pages: builds and deploys the site with the Action.
- Publish to GitLab Pages: the same with the GitLab CI template.
- Publish to another host: runs it in any CI, with the cache headers the site wants.
- Preview pull requests: uses
--previewto show a pull request on Compare. - How the Workspace is found: where it looks for
workspace.yaml.
Documents the beta branch at cd98671, ahead of the latest release, v1.4.0.