FerryDocs

Build from git

Ferry clones the repository, builds the docs on the server and deploys them again at each push.

Edit on GitHub
Terminal
ferry create ferry-docs --type static \
  --repo https://github.com/Carter2307/ferry --branch dev \
  --build-cmd "cd docs && npm ci --include=dev && npm run build" \
  --publish-dir docs/out \
  -e DOCS_SITE_URL=https://docs.example.com \
  --domain docs.example.com \
  --follow

Clone. Ferry clones the branch dev of the repository.

1 / 5

Why each setting

SettingCause
--branch devThe docs/ folder is on the dev branch, where new work comes first. When main has docs/, change the branch: ferry update ferry-docs --branch main.
cd docs and --publish-dir docs/outThe and the . The build runs from the root of the repository, not from docs/. The site imports the design tokens from ../web/src/styles/tokens.css, thus the build needs the full repository.
--include=devThe root has no package.json. Thus Ferry runs the build command in a plain node:22-alpine image, with NODE_ENV=production set. Without the flag, npm ci does not install the , which include the build tools.
-e DOCS_SITE_URL=…The build command can read the variables of the service. Thus the export gets the correct public URL.
--domainFerry serves the site on your own domain. It gets a certificate if the server has automatic HTTPS. See Custom domains & HTTPS.

Deploy again

The service follows dev, with on. Add the GitHub webhook from Auto-deploy from GitHub. Then each push to dev builds and deploys the docs again.

To deploy by hand, run ferry deploy ferry-docs --follow.

Deploys are atomic

The new version gets traffic only after its build is good and nginx answers. A failed build leaves the current version online.

On this page