Repository navigation
Deploy the site on every push to main - #22
Open
evertonfraga wants to merge 1 commit into
Open
evertonfraga wants to merge 1 commit into
evertonfraga wants to merge 1 commit into
Conversation
The site was deployed only when someone ran the workflow by hand, so the published pages lagged main. Meanwhile the repository's Pages source was a branch (main:/docs), so GitHub's built-in pages-build-deployment rebuilt the site from that folder on every push. Its Jekyll render has no root index.html (the generated site is gitignored), which replaced the landing page with a 404 until the workflow was run again. The Pages source is now "GitHub Actions" (a repository setting, changed separately), so this workflow is the only deployer. It runs on pushes to main that change docs/site or docs/guide/src, and still on demand. After deploying, it waits until the live site serves this run's commit (/build.txt) and then checks that the root and the guide index serve the site, so a broken deployment fails the run instead of going unnoticed. Also: - actions bumped to their current majors (Node 24); the old ones warned that Node 20 is deprecated - the build dependencies are pinned in docs/site/requirements.txt, used by this workflow and by CI's site build - docs/site/README.md and the workflow no longer say Pages is not enabled
This was referenced Oct 23, 2026
This branch has not been 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.
Summary
Makes
Deploy site to Pagesthe site's only deployer, run on every push tomain, and fails it when the published site is not the one it built.Repository setting (already applied)
The Pages source was a branch (
main:/docs), so GitHub's built-inpages-build-deploymentalso rebuilt the site from that folder on every push. Its Jekyll render has no rootindex.html(the generated pages are gitignored), so it replaced the landing page with a 404 until the workflow was run by hand.I set the source to "GitHub Actions" (
gh api -X PUT repos/strata-org/Strata-Solidity/pages -f build_type=workflow). The live site still serves (200). Revert with-f build_type=legacyif needed..github/workflows/deploy-pages.ymlmainthat changedocs/site/**,docs/guide/src/**or the workflow itself, and still on demand./build.txt, then checks that the root anddocs/index.htmlserve the site.checkout@v7,setup-python@v7,configure-pages@v6,upload-pages-artifact@v5,deploy-pages@v5. The previous run warned that the old ones target Node 20, which is deprecated.docs/site/requirements.txt.Other files
docs/site/requirements.txt(new): pinsmarkdown==3.11andpygments==2.19.2;ci.yml's site build uses it too.docs/site/README.md: describes the push trigger and the required Pages source, instead of saying Pages is not enabled.docs/site/.gitignore: ignores the generatedbuild.txt.Testing
github-pagesenvironment only allows deployments frommain, so it first runs when this merges. I'll check that run, and thatpages-build-deploymentno longer runs on that push.