Appearance
Publish these docs on GitHub Pages
This site is built with VitePress from the bitstreamott/docs repository. The workflow .github/workflows/docs.yml builds it and publishes it to GitHub Pages at https://bitstreamott.github.io/docs/ on every push to main.
1. Turn on Pages
- On GitHub, open the repository Settings, then Pages.
- Under Build and deployment, set Source to GitHub Actions.
That is all the workflow needs. It uses the built-in GITHUB_TOKEN, so there is no secret to add.
2. Pick the base path
The site must know the path it is served from. The workflow passes it in the DOCS_BASE environment variable.
| Where the site lives | DOCS_BASE | What to do |
|---|---|---|
https://bitstreamott.github.io/docs/ | /docs/ | Nothing. This is the default. |
https://<owner>.github.io/ (the repo is named <owner>.github.io) | / | Add the repository variable DOCS_BASE with the value /. |
A custom domain, like docs.example.com | / | Add the repository variable DOCS_BASE with the value /, and set the domain under Settings > Pages. |
Repository variables are under Settings > Secrets and variables > Actions > Variables.
3. Run it
Push to main, or open Actions, pick docs and click Run workflow. When it ends, the deploy job shows the site address.
To test a base path on your machine:
bash
DOCS_BASE=/docs/ pnpm docs:build
pnpm docs:preview4. Link the panel to the docs
The panel shows links to these docs only when it is built with VITE_DOCS_URL. The official releases are built with VITE_DOCS_URL=https://bitstreamott.github.io/docs, the address of this site. If you build the panel yourself, set it the same way:
bash
VITE_DOCS_URL=https://bitstreamott.github.io/docs pnpm buildA panel on a static host can also read it at run time from config.json ("docsUrl"). Without either, the panel shows no doc links.