Skip to content

Workflow file for this run

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: "sync"
cancel-in-progress: false
# Default to bash
defaults:
run:
shell: bash
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Find and Replace
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "/images"
replace: "../../../../static/images"
include: "**.md"
regex: false
- uses: fregante/setup-git-user@v2
- name: Sync to Gitee
shell: bash
run: |
remote_repo="https://${{ github.actor }}:${{ secrets.GITEE_PAT }}@gitee.com/ZL-Audio/ZLWiki.git"
git add -A
git commit -m "sync to gitee"
git remote add gitee "${remote_repo}"
git show-ref
git branch --verbose
git push --all --force gitee
git push --tags --force gitee