diff --git a/.github/workflows/SYNC.yml b/.github/workflows/sync.yml similarity index 71% rename from .github/workflows/SYNC.yml rename to .github/workflows/sync.yml index 40c6b33..eb1fdf6 100644 --- a/.github/workflows/SYNC.yml +++ b/.github/workflows/sync.yml @@ -1,4 +1,4 @@ -name: PushToGitee +name: Code SYNC on: workflow_run: workflows: BuildAndDeploy # 需要监听的流程名字 @@ -35,3 +35,16 @@ jobs: env: GITEE_REPOSITORY: shenweiyan/Markdown2Html GITEE_PASSWORD: ${{ secrets.GITEE_PASSWORD }} + + - name: Push to Gitcode + run: | + remote_repo="https://shenweiyan:${GITCODE_PASSWORD}@gitcode.com/${GITCODE_REPOSITORY}.git" + git remote add gitcode "${remote_repo}" + git show-ref + git branch --verbose + # publish all + git push --all --force gitcode + git push --tags --force gitcode + env: + GITCODE_REPOSITORY: shenweiyan/Markdown2Html + GITCODE_PASSWORD: ${{ secrets.GITCODE_PAT }}