yaml update2
This commit is contained in:
parent
5e56bf1b8c
commit
a7e51a91aa
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue