Build or serve a MkDocs site with the managed CI preset, theme overrides, and containerized toolchain. Generated configuration is kept inside the action container; only the built site is written to the workspace.
- name: Build MkDocs site
id: site
uses: athackst/ci/actions/mkdocs-preset@main
| Name | Description | Default |
|---|---|---|
docs-dir |
Documentation source directory, relative to the workspace. (optional) | docs |
site-dir |
Built site directory, relative to the workspace. (optional) | site |
site-name |
The name of the documentation site. (optional) | $ |
repo-url |
The source repository URL. (optional) | https://github.com/$ |
site-url |
The canonical URL of the generated site. (optional) | "" |
edit-uri |
The repository-relative edit URI. (optional) | edit/main/ |
| Name | Description |
|---|---|
site-path |
Relative path to the built site in the workspace. |
docs_dir, site_dir, and theme overrides to explicit paths because the generated mkdocs.yml is kept outside the repository workspace.mkdocs build when used as a GitHub Action.serve as its command for local live preview.awesome-nav plugin and its default .nav.yml files for navigation configuration.Build and upload the generated site:
- name: Build MkDocs site
id: site
uses: athackst/ci/actions/mkdocs-preset@main
with:
site-url: https://example.github.io/project/
- name: Upload site
uses: actions/upload-pages-artifact@v5
with:
path: $
Run the published image locally:
docker run --rm -it \
--user "$(id -u):$(id -g)" \
-p 8000:8000 \
-v "$PWD:/github/workspace" \
ghcr.io/athackst/ci/mkdocs-preset:latest serve