From dc5a666ea457f25cc7d503076fb08980aad4c479 Mon Sep 17 00:00:00 2001 From: ComfyUI Wiki Date: Wed, 1 Apr 2026 12:52:52 +0800 Subject: [PATCH] fix: delete existing remote branch before push to handle workflow re-run --- .github/workflows/translation-sync.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/translation-sync.yml b/.github/workflows/translation-sync.yml index ae74ed46..82a4f556 100644 --- a/.github/workflows/translation-sync.yml +++ b/.github/workflows/translation-sync.yml @@ -98,6 +98,8 @@ jobs: BRANCH="i18n/sync-${{ steps.commits.outputs.short_sha }}" git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" + # Delete remote branch if it already exists (re-run scenario) + git push origin --delete "$BRANCH" 2>/dev/null || true git checkout -b "$BRANCH" git add "ja/" "zh/" "snippets/ja/" "snippets/zh/" 2>/dev/null || true git diff --cached --quiet || git commit -m "i18n: sync translations for ${{ steps.commits.outputs.short_sha }}"