Publish documentation as a GitHub Pages artifact - #42
Merged
Conversation
The documentation job no longer pushes the built site to a gh-pages branch with mkdocs gh-deploy. It now runs mkdocs build and uploads the result with actions/upload-pages-artifact, and a new publish job deploys that artifact with actions/deploy-pages from a documentation-website environment. Building now runs on every push and pull request, so a broken mkdocs configuration fails a pull request instead of only failing when a release is published. Publishing still requires a published release that is not a prerelease, and can also be requested with the publish-docs-website workflow dispatch input.
bruno-f-cruz
approved these changes
Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pyharp deployed its documentation by running
mkdocs gh-deploy --force, which builds the site and pushes it to agh-pagesbranch. This moves it onto the GitHub Pages deployment API instead, following the pattern already inharp-tech/core.picoandharp-tech/core.atxmega. A build job collects the site withactions/upload-pages-artifact, and a separate publish job deploys it withactions/deploy-pages.The build is no longer restricted to releases, so it now runs on every push and pull request. A broken nav entry or
mkdocs.ymlchange fails a pull request rather than only failing once a release is published. The existingfetch-depth: 0stays, because thegit-authorsplugin blames every page and needs the full commit history.Publishing keeps a dependency on
publish-to-pypi, so a release whose wheels never reach PyPI does not get a live documentation site.