ci: replace docgen push with staleness check

Problem: the docgen workflow pushed directly to main, which is blocked
by repository rulesets. No token-based push from GitHub Actions can
bypass ruleset rules on personal repos.

Solution: replace the push step with a git diff --exit-code check that
fails if generated docs are out of date. Docs must now be committed by
the developer via make doc. Also regenerates docs to reflect batch 4
changes (close_float, OilFileIcon, OilExecutableHidden, recipe link).
This commit is contained in:
Barrett Ruth 2026-02-20 21:16:17 -05:00
parent 181e735c3b
commit bb128e96af
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
3 changed files with 19 additions and 19 deletions

View file

@ -84,20 +84,9 @@ jobs:
run: |
python -m pip install pyparsing==3.0.9
make doc
- name: Commit changes
if: ${{ github.ref == 'refs/heads/main' }}
env:
GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN || secrets.GITHUB_TOKEN }}
COMMIT_MSG: |
[docgen] Update docs
skip-checks: true
- name: Check docs are up to date
run: |
git config user.email "actions@github"
git config user.name "Github Actions"
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
git add README.md doc
# Only commit and push if we have changes
git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push origin HEAD:${GITHUB_REF})
git diff --exit-code README.md doc
release:
name: release