From 28c83d1f3dbb3727fdb654f2c4d57796182c257a Mon Sep 17 00:00:00 2001 From: Steven Shum Date: Mon, 4 Mar 2024 10:44:02 +0800 Subject: [PATCH] Update and rename SYNC.yml to sync.yml --- .github/workflows/{SYNC.yml => sync.yml} | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) rename .github/workflows/{SYNC.yml => sync.yml} (71%) 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 }}