ci: 解决sync-wiki.yml异常退出问题

This commit is contained in:
Junyan Qin 2023-07-31 15:41:37 +08:00 committed by GitHub
parent fc803a3742
commit a11a152bd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,11 +30,16 @@ jobs:
- name: Copy res/wiki content to wiki
run: |
cp -r res/wiki/* wiki/
- name: Check for changes
run: |
cd wiki
if git diff --quiet; then
echo "No changes to commit."
exit 0
fi
- name: Commit and Push Changes
run: |
cd wiki
if git diff --name-only; then
git add .
git commit -m "Update wiki"
git push
fi
git add .
git commit -m "Update wiki"
git push