yaml update
This commit is contained in:
parent
6b04d17c7f
commit
343ac1fc04
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
name: Sync Wiki
|
||||
|
||||
on:
|
||||
true:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
@ -19,31 +20,27 @@ jobs:
|
|||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: repo
|
||||
|
||||
- name: Checkout Wiki
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ${{ github.repository }}.wiki
|
||||
path: wiki
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pip install pyyaml
|
||||
|
||||
- name: Sync markdown files to Wiki
|
||||
run: |
|
||||
python $GITHUB_WORKSPACE/repo/.github/scripts/sync-wiki.py
|
||||
env:
|
||||
GITHUB_REPOSITORY: ${{ github.repository }}
|
||||
|
||||
- name: Push changes to wiki
|
||||
run: |
|
||||
cd wiki
|
||||
git config user.name "${{ github.actor }}"
|
||||
git config user.email "${{ github.actor }}@users.noreply.github.com"
|
||||
git add .
|
||||
git diff --quiet && git diff --staged --quiet || (git commit -m "Auto sync wiki from main repository" && git push)
|
||||
git diff --quiet && git diff --staged --quiet || \
|
||||
(git commit -m "Auto sync wiki from main repository" && git push)
|
||||
|
|
Loading…
Reference in New Issue