yaml update3
This commit is contained in:
parent
a7e51a91aa
commit
86367c7e2c
|
@ -1,4 +1,3 @@
|
|||
---
|
||||
name: Sync-Wiki
|
||||
|
||||
on:
|
||||
|
@ -6,10 +5,10 @@ on:
|
|||
branches:
|
||||
- main
|
||||
paths:
|
||||
- '**/*.md'
|
||||
- '.github/workflows/sync-wiki.yml'
|
||||
- '.github/workflows/markdownList.yml'
|
||||
- '.github/scripts/sync-wiki.py'
|
||||
- "**/*.md"
|
||||
- ".github/workflows/sync-wiki.yml"
|
||||
- ".github/workflows/markdownList.yml"
|
||||
- ".github/scripts/sync-wiki.py"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
@ -20,12 +19,14 @@ jobs:
|
|||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: repo
|
||||
|
||||
- name: Checkout Wiki
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ${{ github.repository }}.wiki
|
||||
path: wiki
|
||||
continue-on-error: true
|
||||
|
||||
- name: Create Wiki Directory if Not Exists
|
||||
run: |
|
||||
if [ ! -d "wiki" ]; then
|
||||
|
@ -36,17 +37,21 @@ jobs:
|
|||
git config user.email "${{ github.actor }}@users.noreply.github.com"
|
||||
git remote add origin "https://github.com/${{ github.repository }}.wiki.git"
|
||||
fi
|
||||
|
||||
- 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
|
||||
|
|
Loading…
Reference in New Issue