Skip to content

ci(pages): build the published site from scripts/build-pages.sh - #268

Merged
Naruto merged 1 commit into
developfrom
ci/local-pages-build
Aug 16, 2026
Merged

ci(pages): build the published site from scripts/build-pages.sh#268
Naruto merged 1 commit into
developfrom
ci/local-pages-build

Conversation

@Naruto

@Naruto Naruto commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

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, and pages.yml runs 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.sh New. prepare-docs.sh (only when zensical is missing) → build-docs.sh, both locales, English first → report what landed → optionally serve site/. key=value options and --help like the rest of scripts/. It adds no build step of its own; the two it wraps stay the owners of the locale order and --strict.
.github/workflows/pages.yml The build job is now build-pages.sh prepare=no serve=no. prepare-docs.sh stays a step of its own so a dependency failure reads as one in the run summary.
AGENTS.md The paragraph for it, and the claim that build-docs.sh is what pages.yml runs — true until this PR — corrected rather than left to rot.
prepare=<auto|yes|no>  auto = only when no zensical is found; yes is what a changed
                       pin in docs/requirements.txt needs; no is for CI
venv=<dir>             passed through to prepare-docs.sh / build-docs.sh
serve=<yes|no> port=   one server over both locales — the point of the script, and
                       the one thing `zensical serve` cannot do

Verification

  • A full run (scripts/build-pages.sh, no options): both locales build --strict-clean, site/index.html and site/ja/index.html reported present.
  • Option parsing, --help and the validation branches (a bad enum, a non-numeric port) exercised; bash -n clean.

Not included

No .ps1 twin. The site here carries no demo, so a local Pages build is a convenience rather than the only way to see what ships, and build-docs.ps1 still covers the Windows path for the half that gates a merge.

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.
@Naruto
Naruto merged commit 63999a2 into develop Aug 16, 2026
0 of 2 checks passed
@Naruto
Naruto deleted the ci/local-pages-build branch August 16, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant