Skip to content

Commit

Permalink
sync current branch to gitee only
Browse files Browse the repository at this point in the history
  • Loading branch information
copdips committed Jan 20, 2024
1 parent 63b8c38 commit 80d6378
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/sync-to-gitee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,26 @@ concurrency:
group: ${{ github.workflow}}
cancel-in-progress: true

env:
GITEE_REPOSITORY: copdips/copdips.github.io
jobs:
sync_to_gitee:
runs-on: ubuntu-latest
steps:
# - uses: actions/checkout@v2

- name: sync-gitee-mirror
uses: abersheeran/sync-gitee-mirror@v1-beta
# - name: sync-gitee-mirror
# uses: abersheeran/sync-gitee-mirror@v1-beta
# # https://github.com/abersheeran/sync-gitee-mirror
# with:
# repository: ${{ env.GITEE_REPOSITORY }}
# username: ${{ env.GITEE_USERNAME }}
# password: ${{ secrets.GITEE_PAT }}

- uses: actions/checkout@v4
with:
repository: copdips/copdips.github.io
username: ${{ secrets.GITEE_USERNAME }}
password: ${{ secrets.GITEE_PAT }}
fetch-depth: 0
- run: |
remote_repo="https://${{ vars.GITEE_USERNAME }}:${{ secrets.GITEE_PAT }}@gitee.com/${{ env.GITEE_REPOSITORY }}.git"
git remote add gitee "${remote_repo}"
branch=$(git branch --show-current)
git push gitee $branch -f

0 comments on commit 80d6378

Please sign in to comment.