Skip to content

Commit

Permalink
m
Browse files Browse the repository at this point in the history
  • Loading branch information
zsliu98 committed Apr 12, 2024
1 parent d125911 commit 67606d2
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Sync to Gitee

on:
# Runs on pushes targeting the default branch
push:
branches:
- main

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

# Default to bash
defaults:
run:
shell: bash

jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Find and Replace
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "/images"
replace: "../../../../static/images"
include: "**.md"
regex: false
- name: Sync to Gitee
shell: bash
run: |
remote_repo="https://${{ github.actor }}:${{ secrets.GITEE_PAT }}@gitee.com/ZLWiki.git"
git remote add gitee "${remote_repo}"
git show-ref
git branch --verbose
git push --all --force gitee
git push --tags --force gitee

0 comments on commit 67606d2

Please sign in to comment.