Deployment
The site builds to plain HTML, CSS, and JavaScript, so it can be hosted anywhere static files are served. These docs target GitHub Pages.
Build output
A production build prerenders every route:
npx nx build docs
The static, deployable files land in:
dist/docs/analog/public
That folder contains an index.html for /, a prerendered HTML file for every
doc, a 404.html, a .nojekyll marker, and hashed assets.
The base path
GitHub Pages serves project sites from a subpath:
https://<user>.github.io/<REPO_NAME>/
To make links and assets resolve there, the build sets Vite's base and Angular's
APP_BASE_HREF from a single source of truth. Locally, nx serve still runs at
/; production builds use /<REPO_NAME>/.
Change the repo name in one place — the
REPO_NAMEconstant indocs/vite.config.ts(or theREPO_NAMEenvironment variable). The deploy workflow sets it automatically from the repository name.
Continuous deployment
The workflow at .github/workflows/deploy.yml runs on every push to main:
- name: Build
run: npx nx build docs
env:
REPO_NAME: ${{ github.event.repository.name }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: dist/docs/analog/public
Enabling Pages
- Push the repository to GitHub.
- Open Settings → Pages.
- Set Source to GitHub Actions.
- Push to
main(or run the workflow manually) and wait for the deploy.
Prefer to preview the production build locally first? See the Getting Started guide for the serve and build commands.