From 0da17e4f7472da4f6421b52dcb773c61d54f075c Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 23 Apr 2026 17:44:41 +0100 Subject: [PATCH] ci: retry docs publish clone failures --- .github/workflows/docs-sync-publish.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs-sync-publish.yml b/.github/workflows/docs-sync-publish.yml index f0099d6a5c1..8e0d9bcaf9c 100644 --- a/.github/workflows/docs-sync-publish.yml +++ b/.github/workflows/docs-sync-publish.yml @@ -32,9 +32,19 @@ jobs: OPENCLAW_DOCS_SYNC_TOKEN: ${{ secrets.OPENCLAW_DOCS_SYNC_TOKEN }} run: | set -euo pipefail - git clone \ - "https://x-access-token:${OPENCLAW_DOCS_SYNC_TOKEN}@github.com/openclaw/docs.git" \ - publish + for attempt in 1 2 3 4 5; do + rm -rf publish + if git clone \ + "https://x-access-token:${OPENCLAW_DOCS_SYNC_TOKEN}@github.com/openclaw/docs.git" \ + publish; then + exit 0 + fi + echo "Clone attempt ${attempt} failed; retrying." + sleep $((attempt * 2)) + done + + echo "Failed to clone publish repo after retries." >&2 + exit 1 - name: Sync docs into publish repo run: |