ci(docs): retry publish sync pushes

This commit is contained in:
Peter Steinberger 2026-04-05 18:42:15 +01:00
parent a1c1598742
commit b5e87be7f0
No known key found for this signature in database
1 changed files with 13 additions and 1 deletions

View File

@ -46,6 +46,7 @@ jobs:
- name: Commit publish repo sync
working-directory: publish
run: |
set -euo pipefail
if git diff --quiet -- docs .openclaw-sync; then
echo "No publish-repo changes."
exit 0
@ -55,4 +56,15 @@ jobs:
git config user.email "openclaw-docs-sync[bot]@users.noreply.github.com"
git add docs .openclaw-sync
git commit -m "chore(sync): mirror docs from $GITHUB_REPOSITORY@$GITHUB_SHA"
git push origin HEAD:main
for attempt in 1 2 3 4 5; do
git fetch origin main
git rebase origin/main
if git push origin HEAD:main; then
exit 0
fi
echo "Push attempt ${attempt} failed; retrying."
sleep $((attempt * 2))
done
echo "Failed to push publish-repo sync after retries."
exit 1