From 3405d71a3dbbdd975e72efd9b20f305a2b252a83 Mon Sep 17 00:00:00 2001 From: Xiangyu Wang Date: Mon, 8 Jun 2026 14:32:33 +0800 Subject: [PATCH] fix(ci): align docs sync branch Rebuild the website sync branch from the target main branch and stage deletions so stale sync commits are cleared reliably. Signed-off-by: Xiangyu Wang Assisted-by: OpenCode:gpt-5.5 --- .github/workflows/docs.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index d83f2f043..1f8ab0c0d 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -23,6 +23,7 @@ jobs: with: repository: vsag-io/vsag-io.github.io token: ${{ secrets.GH_PAT }} + ref: main path: repo-vsagio - name: Sync docs books (zh, en) @@ -47,11 +48,12 @@ jobs: cd repo-vsagio git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" + git checkout -B sync origin/main + git add -A docs blogs landing if [[ -z $(git status --porcelain) ]]; then echo "No changes to commit." + git push --force origin sync exit 0 fi - git checkout -B sync - git add docs blogs landing git commit -m "docs: sync from vsag@${{ github.sha }}" git push --force origin sync