Skip to content
This repository was archived by the owner on Mar 22, 2026. It is now read-only.

Commit 5366b95

Browse files
committed
修复 gitee 同步
1 parent df71f45 commit 5366b95

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

.github/workflows/sync-to-gitee.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,23 @@ jobs:
2121
git config --global user.email "actions@github.com"
2222
2323
- name: Add Gitee remote
24-
run: git remote add gitee ${{ secrets.GITEE_REPO }}
24+
run: git remote add gitee git@gitee.com:WhiteElephant-abc/TouchControllerWiki.git
2525

2626
- name: Configure SSH
27+
env:
28+
PRIVATE_KEY: ${{ secrets.GITEE_PRIVATE_KEY }}
2729
run: |
2830
mkdir -p ~/.ssh
29-
echo "${{ secrets.GITEE_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
31+
echo "$PRIVATE_KEY" > ~/.ssh/id_ed25519
3032
chmod 700 ~/.ssh
3133
chmod 600 ~/.ssh/id_ed25519
3234
ssh-keyscan -t ed25519 gitee.com >> ~/.ssh/known_hosts
3335
34-
- name: Push to Gitee
36+
- name: Filter out markdown files
3537
run: |
36-
git add *.md
37-
git commit -m "Sync markdown files via GitHub Actions" || true
38-
git push gitee main:main --force
38+
apt-get update && apt-get install -y git-filter-repo
39+
git filter-repo --path-glob '*.md'
40+
41+
# - name: Push to Gitee
42+
# run: git push gitee main:main --force
43+

0 commit comments

Comments
 (0)