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