mirror of
https://github.com/PhasicFlow/phasicFlow.git
synced 2025-07-08 03:07:03 +00:00
yaml update2
This commit is contained in:
19
.github/workflows/sync-wiki.yml
vendored
19
.github/workflows/sync-wiki.yml
vendored
@ -25,6 +25,17 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
repository: ${{ github.repository }}.wiki
|
repository: ${{ github.repository }}.wiki
|
||||||
path: wiki
|
path: wiki
|
||||||
|
continue-on-error: true
|
||||||
|
- name: Create Wiki Directory if Not Exists
|
||||||
|
run: |
|
||||||
|
if [ ! -d "wiki" ]; then
|
||||||
|
mkdir -p wiki
|
||||||
|
cd wiki
|
||||||
|
git init
|
||||||
|
git config user.name "${{ github.actor }}"
|
||||||
|
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
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
@ -42,5 +53,9 @@ jobs:
|
|||||||
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 || \
|
if git status --porcelain | grep .; then
|
||||||
(git commit -m "Auto sync wiki from main repository" && git push)
|
git commit -m "Auto sync wiki from main repository"
|
||||||
|
git push --set-upstream https://${{ github.actor }}:${{ github.token }}@github.com/${{ github.repository }}.wiki.git master -f
|
||||||
|
else
|
||||||
|
echo "No changes to commit"
|
||||||
|
fi
|
||||||
|
Reference in New Issue
Block a user