Repository navigation
Publish the site from a gh-pages branch - #2
Merged
Merged
Conversation
Push the built HTML and PDF to a gh-pages branch with peaceiris/actions-gh-pages, the way the other Cryptnox documentation repositories do, so the generated site stays out of the source branch. Pages on this repository is set to serve the main branch, which made every push race GitHub's own Jekyll build against the Actions deployment: whichever finished last was served. The workflow now points the Pages source at gh-pages after publishing, and fails with an instruction for an administrator if its token is not allowed to. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
embarquech
had a problem deploying
to
github-pages
September 15, 2026 09:25 — with
GitHub Pages
Failure
This branch had an error being deployed
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.
Publishes the site from a
gh-pagesbranch, the way cryptnox-cli, cryptnox-sdk-py and cryptnox-id-cli do, so the generated HTML and PDF stay out ofmain.Why now: Pages on this repository is set to serve the
mainbranch. With the previous workflow, every push tomainran GitHub's own Jekyll build of the repository root and the Actions deployment, and whichever finished last was served. The first deploy happened to end with the Sphinx site on top; a later push could just as easily have left the rendered README there instead.What changes:
docs.yml: Sphinx HTML with-W, the PDF built with pdflatex and copied next to it, thenpeaceiris/actions-gh-pages@v4pushesdocs/_build/htmltogh-pages(with.nojekyll). Pull request builds still run the full build as a check and publish nothing.gh-pagesbranch using the workflow token (pages: write). It is a no-op once the source is right. If the token is not allowed to change it, the step fails with the instruction: an administrator sets Settings > Pages > Source to Deploy from a branch, branchgh-pages, folder/ (root).After merging, check the first run on
main. If the last step is green, the site is served fromgh-pagesand nothing else is needed. If it is red, apply the one-time setting above straight away: until then the site shows the rendered README instead of the documentation. Thegh-pagesbranch will already exist with the full site by that point.🤖 Generated with Claude Code