Skip to content

Commit

Permalink
Update and rename SYNC.yml to sync.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
shenweiyan authored Mar 4, 2024
1 parent 690f2e7 commit 28c83d1
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/SYNC.yml → .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PushToGitee
name: Code SYNC
on:
workflow_run:
workflows: BuildAndDeploy # 需要监听的流程名字
Expand Down Expand Up @@ -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 }}

0 comments on commit 28c83d1

Please sign in to comment.