Skip to content

Publish documentation as a GitHub Pages artifact - #42

Merged
glopesdev merged 1 commit into
mainfrom
deploy-docs-with-pages-artifact
Aug 24, 2026
Merged

Publish documentation as a GitHub Pages artifact#42
glopesdev merged 1 commit into
mainfrom
deploy-docs-with-pages-artifact

Conversation

@glopesdev

Copy link
Copy Markdown
Contributor

pyharp deployed its documentation by running mkdocs gh-deploy --force, which builds the site and pushes it to a gh-pages branch. This moves it onto the GitHub Pages deployment API instead, following the pattern already in harp-tech/core.pico and harp-tech/core.atxmega. A build job collects the site with actions/upload-pages-artifact, and a separate publish job deploys it with actions/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.yml change fails a pull request rather than only failing once a release is published. The existing fetch-depth: 0 stays, because the git-authors plugin 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.

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.
@glopesdev
glopesdev requested a review from bruno-f-cruz August 24, 2026 01:57
@glopesdev glopesdev added the documentation Improvements or additions to documentation label Aug 24, 2026
@glopesdev
glopesdev merged commit 368a623 into main Aug 24, 2026
14 checks passed
@glopesdev
glopesdev deleted the deploy-docs-with-pages-artifact branch August 24, 2026 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants