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
42
.github/workflows/sync-website.yml
vendored
Normal file
42
.github/workflows/sync-website.yml
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
name: Sync website
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- docs/**
|
||||
|
||||
concurrency:
|
||||
group: sync-website
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
sync-website:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
token: ${{ github.token }}
|
||||
|
||||
- name: Checkout website
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: mangowm/mangowm.github.io
|
||||
path: website
|
||||
token: ${{ secrets.WEBSITE_SYNC_TOKEN }}
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Sync docs
|
||||
run: |
|
||||
rm -rf website/apps/web/content/docs
|
||||
cp -r docs website/apps/web/content/docs
|
||||
|
||||
- name: Commit and push
|
||||
working-directory: website
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add apps/web/content/docs
|
||||
git diff --staged --quiet || git commit -m "sync from mango @ ${{ github.sha }}"
|
||||
git push
|
||||
Loading…
Add table
Add a link
Reference in a new issue