From a11a152bd7a029e77c904cac1ca578535eb7a3b1 Mon Sep 17 00:00:00 2001 From: Junyan Qin <1010553892@qq.com> Date: Mon, 31 Jul 2023 15:41:37 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E8=A7=A3=E5=86=B3sync-wiki.yml=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E9=80=80=E5=87=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/sync-wiki.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/sync-wiki.yml b/.github/workflows/sync-wiki.yml index 88575988..8779e9d3 100644 --- a/.github/workflows/sync-wiki.yml +++ b/.github/workflows/sync-wiki.yml @@ -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