mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-03-14 05:34:21 -04:00
feat: add docs and sync with wiki & website
This commit is contained in:
parent
1fc89d01eb
commit
5906d9621e
28 changed files with 2594 additions and 0 deletions
40
.github/workflows/sync-wiki.yml
vendored
Normal file
40
.github/workflows/sync-wiki.yml
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
name: Sync wiki
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- docs/**
|
||||
|
||||
concurrency:
|
||||
group: sync-wiki
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
sync-wiki:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Clone wiki
|
||||
run: |
|
||||
git clone --depth 1 \
|
||||
https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.wiki.git \
|
||||
wiki-temp
|
||||
|
||||
- name: Sync docs to wiki
|
||||
run: |
|
||||
find wiki-temp -not -path 'wiki-temp/.git*' -type f -delete
|
||||
python3 .github/scripts/sync-wiki.py
|
||||
|
||||
- name: Commit and push
|
||||
working-directory: wiki-temp
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add -A
|
||||
git diff --staged --quiet || git commit -m "sync from ${{ github.sha }}"
|
||||
git push
|
||||
Loading…
Add table
Add a link
Reference in a new issue