We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc42f0e commit 71ada3bCopy full SHA for 71ada3b
.github/workflows/sync_to_gitee.yml renamed to .github/workflows/sync_repo.yml
@@ -14,7 +14,7 @@ jobs:
14
- name: Checkout
15
uses: actions/checkout@v4
16
with:
17
- fetch-depth: 1
+ fetch-depth: 0
18
19
- name: Setup SSH
20
run: |
@@ -23,7 +23,16 @@ jobs:
23
chmod 600 ~/.ssh/id_rsa
24
ssh-keyscan gitee.com >> ~/.ssh/known_hosts
25
26
- - name: Push to Gitee
+ - name: Create single commit and push
27
28
+ git config user.name "GitHub Actions"
29
+ git config user.email "actions@github.com"
30
+
31
+ # Create a new branch
32
+ git checkout --orphan new-main
33
+ git add .
34
+ git commit -m "Sync from GitHub: $(date)"
35
36
+ # Add Gitee remote and force push
37
git remote add gitee ${{ vars.GITEE_REPO_URL }}
- git push --force gitee main:main
38
+ git push --force gitee new-main:main
0 commit comments