From b5e87be7f05dadab01f1c38ff672b2a360adc922 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 5 Apr 2026 18:42:15 +0100 Subject: [PATCH] ci(docs): retry publish sync pushes --- .github/workflows/docs-sync-publish.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs-sync-publish.yml b/.github/workflows/docs-sync-publish.yml index 239f4d5ee3e..7e653051a51 100644 --- a/.github/workflows/docs-sync-publish.yml +++ b/.github/workflows/docs-sync-publish.yml @@ -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