From 7ee018f62fb4d7d0f4bcdbc45f7a5c383b4d9b10 Mon Sep 17 00:00:00 2001 From: noise Date: Sat, 6 Dec 2025 12:16:08 +0800 Subject: [PATCH 1/4] ci(autoSync): add `AutoSync` action --- .github/workflows/autosync.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/autosync.yml diff --git a/.github/workflows/autosync.yml b/.github/workflows/autosync.yml new file mode 100644 index 00000000..6646d922 --- /dev/null +++ b/.github/workflows/autosync.yml @@ -0,0 +1,27 @@ +name: autosync + +on: + schedule: + - cron: '0 6 * * *' + +jobs: + autosync: + name: Auto Sync + runs-on: ubuntu-latest + steps: + - uses: vuejs-translations/ryu-cho@v1 + with: + workflow-name: autosync + access-token: ${{ secrets.ACCESS_TOKEN }} + username: github-actions + email: "action@github.com" + + upstream-repo: https://github.com/vitest-dev/docs-cn.git + upstream-repo-branch: dev + + head-repo: https://github.com/vuejs/docs.git + head-repo-branch: main + path-starts-with: docs/ + + track-from: 4ed8b2f83a2f149734f3c5ecb6438309bd85a9e5 + From 7d94d561a7af2d6da10f55897748d131970054ee Mon Sep 17 00:00:00 2001 From: noise Date: Sat, 6 Dec 2025 12:42:50 +0800 Subject: [PATCH 2/4] ci(autoSync): Support manual trigger --- .github/workflows/autosync.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/autosync.yml b/.github/workflows/autosync.yml index 6646d922..f49e0241 100644 --- a/.github/workflows/autosync.yml +++ b/.github/workflows/autosync.yml @@ -3,6 +3,7 @@ name: autosync on: schedule: - cron: '0 6 * * *' + workflow_dispatch: jobs: autosync: @@ -12,7 +13,7 @@ jobs: - uses: vuejs-translations/ryu-cho@v1 with: workflow-name: autosync - access-token: ${{ secrets.ACCESS_TOKEN }} + access-token: ${{ secrets.AUTO_SYNC_ACCESS_TOKEN }} username: github-actions email: "action@github.com" From dfa6d36be854de5dfb128b4e0ef4516733fa5b75 Mon Sep 17 00:00:00 2001 From: noise Date: Sat, 6 Dec 2025 12:56:05 +0800 Subject: [PATCH 3/4] ci(autoSync): fix error repo addr --- .github/workflows/autosync.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autosync.yml b/.github/workflows/autosync.yml index f49e0241..8c25efac 100644 --- a/.github/workflows/autosync.yml +++ b/.github/workflows/autosync.yml @@ -17,7 +17,7 @@ jobs: username: github-actions email: "action@github.com" - upstream-repo: https://github.com/vitest-dev/docs-cn.git + upstream-repo: git@github.com:vitest-dev/vitest.git upstream-repo-branch: dev head-repo: https://github.com/vuejs/docs.git From 0ea8aebac65c7fb6aec6e5db4a129850ed788d88 Mon Sep 17 00:00:00 2001 From: noise Date: Sun, 7 Dec 2025 01:34:38 +0800 Subject: [PATCH 4/4] ci(autoSync): add `AutoSync` action --- .github/workflows/autosync.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/autosync.yml b/.github/workflows/autosync.yml index 8c25efac..122dbf0b 100644 --- a/.github/workflows/autosync.yml +++ b/.github/workflows/autosync.yml @@ -2,27 +2,24 @@ name: autosync on: schedule: - - cron: '0 6 * * *' + - cron: '0 6 * * *' # At 06:00. https://crontab.guru/ workflow_dispatch: - jobs: - autosync: - name: Auto Sync + sync: runs-on: ubuntu-latest steps: - uses: vuejs-translations/ryu-cho@v1 with: - workflow-name: autosync access-token: ${{ secrets.AUTO_SYNC_ACCESS_TOKEN }} username: github-actions email: "action@github.com" - upstream-repo: git@github.com:vitest-dev/vitest.git - upstream-repo-branch: dev + upstream-repo: https://github.com/vitest-dev/docs-cn.git + upstream-repo-branch: sync - head-repo: https://github.com/vuejs/docs.git + head-repo: https://github.com/vitest-dev/vitest head-repo-branch: main + track-from: da7ce1712fd4d0e4e807ec01ce755581e6892d5b # v4.0.0 path-starts-with: docs/ - - track-from: 4ed8b2f83a2f149734f3c5ecb6438309bd85a9e5 + workflow-name: AutoSync