GitHub Actions CI/CD
The template includes automated Continuous Integration (CI) and Continuous Deployment (CD) via GitHub Actions.
Note
Keep in mind that the deployment may take a while. You can check the status of the workflow by clicking on "Action" in the menu bar of your repository.
Workflow File
The main workflow is defined in .github/workflows/main.yml. It automatically runs on:
- Push to
mainordevelopbranches - Pull requests targeting the
mainbranch
What the Workflow Does
The CI/CD pipeline is split into three jobs:
build job (matrix: Python 3.10, 3.12):
- Setup: Installs uv and syncs all dev dependencies
- Linting: Runs
ruff checktwice: once for critical errors (syntax/undefined names), once for the full rule set with--exit-zero(warnings only) - Testing: Runs
pytest -v - Coverage: Uploads coverage data to Codecov (requires
CODECOV_TOKENsecret)
build-documentation job (runs after build):
Installs Pandoc and builds Sphinx docs
deploy-documentation job (runs after build-documentation, main branch only):
Deploys built docs to GitHub Pages
Workflow Status
Pull requests show status checks:
- ✅ Passed - All checks successful; safe to merge
- ❌ Failed - Fix issues before merging
- ⏳ Running - Workflow in progress
Enable GitHub Pages Deployment
- Go to Settings → Pages
- Set source to GitHub Actions
- Docs deploy automatically on main branch commits (URL:
https://<username>.github.io/<repo>)
Troubleshooting
Workflow failed – Click the run to view logs and find the failing step.
Docs didn't deploy – Verify GitHub Pages is set to use GitHub Actions as the source.
Codecov upload skipped – Add CODECOV_TOKEN to your repository secrets (Settings → Secrets and variables → Actions).
See Also
- Publishing - PyPI deployment
- Documentation - What gets built