From 722d1182f189b7efb8af2bef1ebd0439862310f5 Mon Sep 17 00:00:00 2001 From: trex Date: Fri, 20 Nov 2026 10:46:37 -0600 Subject: [PATCH] ci: make the README refresh re-run safe --- .github/workflows/readme.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/readme.yml b/.github/workflows/readme.yml index a7f94c9..8c1f171 100644 --- a/.github/workflows/readme.yml +++ b/.github/workflows/readme.yml @@ -63,6 +63,12 @@ jobs: run: | git config user.name trex git config user.email nanobot@jonb.io + # Re-running an older run checks out that run's head SHA, which can be + # behind main, so a plain push is rejected as non-fast-forward. Move + # HEAD to the current tip first; the regenerated files are + # authoritative, so they are re-staged on top of it. + git fetch --quiet origin main + git reset --quiet origin/main git add README.md terminal-dark.svg terminal-light.svg if git diff --cached --quiet; then echo "no change"