diff --git a/.gitea/workflows/readme.yml b/.gitea/workflows/readme.yml index 2112b2d..97d97f1 100644 --- a/.gitea/workflows/readme.yml +++ b/.gitea/workflows/readme.yml @@ -54,6 +54,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 README is + # authoritative, so it is re-staged on top of it. + git fetch --quiet origin main + git reset --quiet origin/main git add README.md if git diff --cached --quiet; then echo "no change"