Skip to content

Commit 15d332a

Browse files
committed
fix(ci): keep docs sync branch aligned
Ensure the website sync branch is rebuilt from the target main branch and force-pushed even when there are no content changes, so repeated sync PRs cannot keep replaying the same stale commit. Signed-off-by: Xiangyu Wang <wxy407827@antgroup.com> Assisted-by: OpenCode:gpt-5.5
1 parent a1b501f commit 15d332a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/docs.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
with:
2424
repository: vsag-io/vsag-io.github.io
2525
token: ${{ secrets.GH_PAT }}
26+
ref: main
2627
path: repo-vsagio
2728

2829
- name: Sync docs books (zh, en)
@@ -47,11 +48,12 @@ jobs:
4748
cd repo-vsagio
4849
git config user.name "github-actions[bot]"
4950
git config user.email "github-actions[bot]@users.noreply.github.com"
51+
git checkout -B sync origin/main
52+
git add docs blogs landing
5053
if [[ -z $(git status --porcelain) ]]; then
5154
echo "No changes to commit."
55+
git push --force origin sync
5256
exit 0
5357
fi
54-
git checkout -B sync
55-
git add docs blogs landing
5658
git commit -m "docs: sync from vsag@${{ github.sha }}"
5759
git push --force origin sync

0 commit comments

Comments
 (0)