Skip to content

Commit dc42f0e

Browse files
authored
[skip ci]fix(ci): update sync workflow (#1061)
1 parent 74bf9f6 commit dc42f0e

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.github/workflows/sync_to_gitee.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,16 @@ jobs:
1414
- name: Checkout
1515
uses: actions/checkout@v4
1616
with:
17-
fetch-depth: 0
17+
fetch-depth: 1
1818

19-
- name: Mirror to Gitee
20-
uses: pixta-dev/repository-mirroring-action@v1
21-
with:
22-
target_repo_url: ${{ vars.GITEE_REPO_URL }}
23-
ssh_private_key: ${{ secrets.GITEE_SSH_PRIVATE_KEY }}
19+
- name: Setup SSH
20+
run: |
21+
mkdir -p ~/.ssh
22+
echo "${{ secrets.GITEE_SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
23+
chmod 600 ~/.ssh/id_rsa
24+
ssh-keyscan gitee.com >> ~/.ssh/known_hosts
25+
26+
- name: Push to Gitee
27+
run: |
28+
git remote add gitee ${{ vars.GITEE_REPO_URL }}
29+
git push --force gitee main:main

0 commit comments

Comments
 (0)