ci: retry the generated-docs push through a rebase on rejection #171

Merged
rootiest merged 1 commits from ci/retry-docs-commit-push into main 2026-09-23 02:59:54 +00:00
1 Commits
Author SHA1 Message Date
rootiest 35a48ac868 ci: retry the generated-docs push through a rebase on rejection
build-docs's auto-commit step was seen rejected as non-fast-forward
(run 976, sha 3bbda31): npm ci + astro build + the Cloudflare Pages
deploy ahead of it can take several minutes, long enough for another
PR to merge into main first. A bare `git push` has no way to recover
from that -- the whole job just fails, even though every real step
(tests, manual verification, man page, site build, deploy) already
succeeded.

This commit only ever touches three generated files
(fish-config.md/.1, the component registry), so a rebase onto
whatever landed is always mechanical -- retry push up to 3 times,
rebasing onto origin/main between attempts. Ends on an explicit
`test "$pushed" -eq 1` rather than trailing off the for loop, so a
run that exhausts all three retries still fails loudly instead of
reporting success.
2026-09-22 22:54:47 -04:00