Skip to content

Sync to Gitee

Sync to Gitee #25

Workflow file for this run

name: Sync to Gitee
on:
push:
branches: [ main ]
workflow_run:
workflows: [ "Deploy" ]
types:
- completed
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout code # 先检出当前代码,确保工作区存在
uses: actions/checkout@v4
with:
fetch-depth: 0 # 获取所有历史,而不是浅克隆
- name: Mirror to Gitee
uses: wearerequired/git-mirror-action@v1
with:
# 显式指定源仓库(当前仓库的地址)
source-repo: https://github.com/${{ github.repository }}.git
# 显式指定目标仓库(你的Gitee仓库地址)
destination-repo: https://${{ secrets.GITEE_USERNAME }}:${{ secrets.GITEE_PRIVATE_TOKEN }}@gitee.com/${{ secrets.GITEE_USERNAME }}/site.git