ci(pages): build the published site from scripts/build-pages.sh - #268
Merged
Conversation
The site here is the documentation and nothing else, so the published tree was already one command — `build-docs.sh` — and what was missing was never a build step. It was the two things around it: the toolchain a fresh clone forgets, and a server over the *whole* tree. `zensical serve` builds one locale at a time, so the header language selector could not be checked at all before a publish, and the site it serves is not the site that gets uploaded. `scripts/build-pages.sh` is that: `prepare-docs.sh` when no zensical is found, `build-docs.sh` in the order that works, then `serve=yes`. `pages.yml` runs it with every option spelled out rather than left to the script's defaults — those are chosen for a working tree, and a publish should not change because one of them did. `prepare-docs.sh` stays a step of its own so a dependency failure is legible as one in the run summary, which is why the script is invoked with `prepare=no`. The name is the family's: `build-pages` means "build what pages.yml publishes" in every repository, and in the ones whose site carries a playable demo or an API reference it carries those too. Here there is nothing else to carry, and the name still points at the same thing. No `.ps1` twin: this site carries no demo, so a local Pages build is a convenience rather than the only way to see what ships — `build-docs.ps1` still covers the Windows path for the half that gates a merge.
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.
The site here is the documentation and nothing else, so the published tree was already one command —
build-docs.sh— and what was missing was never a build step. It was the two things around it: the toolchain a fresh clone forgets, and a server over the whole tree.zensical servebuilds one locale at a time, so the header language selector could not be checked at all before a publish, and the site it serves is not the site that gets uploaded.scripts/build-pages.shis that, andpages.ymlruns it. Same move as SSPlayerForRenPy #45 and SSPlayerForWeb; this is the shape it takes in a repository whose site is docs-only.What changed
scripts/build-pages.shprepare-docs.sh(only when zensical is missing) →build-docs.sh, both locales, English first → report what landed → optionally servesite/.key=valueoptions and--helplike the rest ofscripts/. It adds no build step of its own; the two it wraps stay the owners of the locale order and--strict..github/workflows/pages.ymlbuild-pages.sh prepare=no serve=no.prepare-docs.shstays a step of its own so a dependency failure reads as one in the run summary.AGENTS.mdbuild-docs.shis whatpages.ymlruns — true until this PR — corrected rather than left to rot.Verification
scripts/build-pages.sh, no options): both locales build--strict-clean,site/index.htmlandsite/ja/index.htmlreported present.--helpand the validation branches (a bad enum, a non-numeric port) exercised;bash -nclean.Not included
No
.ps1twin. The site here carries no demo, so a local Pages build is a convenience rather than the only way to see what ships, andbuild-docs.ps1still covers the Windows path for the half that gates a merge.