mirror of
https://github.com/PhasicFlow/phasicFlow.git
synced 2025-06-12 16:26:23 +00:00
yaml update
This commit is contained in:
11
.github/workflows/sync-wiki.yml
vendored
11
.github/workflows/sync-wiki.yml
vendored
@ -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)
|
||||
|
Reference in New Issue
Block a user