Deployment Guide¶
This repository currently relies on two contributor-facing GitHub Actions workflows:
.github/workflows/ci.yml.github/workflows/unified-deployment.yml
Older references to separate docs.yml or release.yml workflows are no longer accurate for this repository.
Continuous Integration¶
ci.yml runs on pushes and pull requests targeting main and develop.
It currently performs three stages:
- Code quality and security
- Uses Python 3.11
- Installs
.[dev]plusbandit,pip-audit,flake8-docstrings, andflake8-import-order - Runs Black, isort, flake8, mypy, Bandit, dependency auditing, and YAML/TOML validation
- Test matrix
- Runs
pyteston Python 3.8, 3.9, 3.10, 3.11, and 3.12 - Uses
REZEN_API_KEYfrom repository secrets when tests need it - Package build
- Builds the package with
python -m build - Verifies artifacts with
twine check
Unified Deployment¶
unified-deployment.yml handles both documentation deployment and releases.
Triggers¶
- Tag pushes matching
v* - Pushes to
mainthat touchdocs/**,mkdocs.yml,rezen/**, or the workflow file itself - Manual
workflow_dispatch
Docs-Only Deployments¶
Docs deployment happens when:
- a qualifying change lands on
main, or - the workflow is run manually with
deploy_docs_only=true
In that path the workflow:
- reruns code quality and tests
- installs docs and development dependencies
- refreshes the generated API coverage include file
- builds the MkDocs site
- deploys the site to GitHub Pages
Release Deployments¶
Release deployment happens when:
- a
v*tag is pushed, or - the workflow is run manually with a
versioninput
For manual releases, the workflow updates both pyproject.toml and rezen/__init__.py, creates the release commit and tag, and pushes them before continuing with the rest of the pipeline.
The release path then:
- reruns quality checks and tests
- builds the package
- publishes to PyPI
- builds and deploys documentation
- creates a GitHub release
Secrets and Permissions¶
The workflows currently depend on these secrets or built-in tokens:
REZEN_API_KEYfor test jobsPYPI_API_TOKENfor PyPI publishingGITHUB_TOKEN, which GitHub Actions provides automatically
unified-deployment.yml also requests write access for repository contents, Pages, packages, and OIDC tokens because it tags releases, publishes packages, and deploys GitHub Pages.
Local Verification¶
Before changing docs, packaging, or deployment behavior, these are the most useful local checks:
python -m pip install -e ".[dev]"
python -m pip install -r docs/requirements.txt
pytest
python -m build
mkdocs build --strict
If you only need to validate the docs build path from a clean repository checkout, this is the exact command sequence used in the docs cleanup task:
What the Repository Does Not Use¶
- There is no standalone
.github/workflows/docs.yml. - There is no standalone
.github/workflows/release.yml. - There is no
.pre-commit-config.yaml.
Keeping those details out of contributor docs helps the human docs stay aligned with the actual automation that exists in the repository today.