This repository was archived by the owner on Mar 22, 2026. It is now read-only.
修复 gitee 同步 #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sync to Gitee | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Git | |
| run: | | |
| git config --global user.name "GitHub Actions" | |
| git config --global user.email "actions@github.com" | |
| - name: Add Gitee remote | |
| run: git remote add gitee git clone git@gitee.com:WhiteElephant-abc/TouchControllerWiki.git | |
| - name: Configure SSH | |
| env: | |
| PRIVATE_KEY: ${{ secrets.GITEE_PRIVATE_KEY }} | |
| run: | | |
| mkdir -p ~/.ssh | |
| echo "$PRIVATE_KEY" > ~/.ssh/id_ed25519 | |
| chmod 700 ~/.ssh | |
| chmod 600 ~/.ssh/id_ed25519 | |
| ssh-keyscan -t ed25519 gitee.com >> ~/.ssh/known_hosts | |
| - name: Filter out markdown files | |
| run: | | |
| git filter-repo --path-match '*.md' --invert-paths --force | |
| - name: Push to Gitee | |
| run: git push gitee main:main --force | |