open only cli (#22) #24
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 | |
- delete | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout GitHub code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # 获取完整历史记录 | |
- name: Configure Git | |
run: | | |
git config --global user.name "Github Action" # 保留,不需要修改 | |
git config --global user.email "action@github.com" # 保留,不需要修改 | |
- name: Add Gitee Remote | |
run: | | |
# git remote add gitee https://${{ secrets.GITEE_USER }}:${{ secrets.GITEE_TOKEN }}@gitee.com/${{ secrets.GITEE_REPO }}.git | |
git remote add gitee https://flyingcys:${{ secrets.GITEE_TOKEN }}@gitee.com/${{ secrets.GITEE_REPO }}.git # token from flyingcys | |
- name: Push to Gitee | |
run: | | |
git push gitee master:master --force | |
git push gitee --tags --force |