Documentation
¶
Overview ¶
Command pagesbuild waits until GitHub Pages has BUILT the gh-pages commit a workflow just pushed, and asks for a new build when it did not:
pagesbuild --token-file F owner/repo <gh-pages commit sha>
Exit 0 when a build of exactly that commit reports "built"; non-zero, with a sentence, when it never does.
Bibliography (opened 2026-11-06, docs.github.com/en/rest/pages/pages):
POST /repos/{owner}/{repo}/pages/builds "Request a GitHub Pages
build": 201 Created, body {url, status}. One concurrent build per
repository and per requester; a request made while another build runs is
queued until it finishes.
GET /repos/{owner}/{repo}/pages/builds "List GitHub Pages builds":
per_page (max 100, default 30), page; an array of Page Build objects.
GET /repos/{owner}/{repo}/pages/builds/latest, .../builds/{build_id}: the
same object.
Page Build: url, status (string), error{message}, pusher, commit (string),
duration, created_at, updated_at.
What that page does NOT say, and this command therefore does not assume: the status values are not enumerated (only "built" and "errored" are acted on; every other value, "queued" and "building" among them, means "not finished"), and it names no token permission for these endpoints. In Actions the job's GITHUB_TOKEN with `pages: write` is what was measured to work for the POST (go-redfish/docs, 2026-11); the read endpoints list the classic `repo` scope for a personal token.
⛔ IT EXISTS BECAUSE A GREEN PUSH IS NOT A PUBLISHED SITE. A site that publishes by pushing to gh-pages is deployed by GitHub's legacy "pages build and deployment", which sometimes stalls in `updating_pages` and fails with "Timeout reached, aborting!" after 10 minutes (go-redfish/docs: 3 times in two days, about 10 successes; runs 42058763350 and 42252993462). Re-running the failed deploy does not help, and re-running the workflow pushes nothing (identical site). POSTing a new build and polling it reached "built" within about 3 minutes every time. The workflow was green throughout, because the push succeeded; only the site was stale.
Builds of OTHER commits are ignored: a build of an older gh-pages commit that is "built" says nothing about the one we pushed. A build is looked for for --grace; none by then counts like an errored one. Every failure path ends non-zero (exit 1), never a quiet pass.