OSDN Git Service

[fix] : Fixed git commit
authorhayao <hayao@fascode.net>
Sat, 23 Oct 2021 07:36:22 +0000 (16:36 +0900)
committerhayao <hayao@fascode.net>
Sat, 23 Oct 2021 07:36:22 +0000 (16:36 +0900)
.github/workflows/hugo.yaml

index a290ddf..0f80e74 100644 (file)
@@ -63,7 +63,10 @@ jobs:
           git config --local user.name "hayao[bot]"
           git config pull.rebase false
           git add -A
-          git commit -m "deploy: ${GITHUB_SHA}" -a
+          if ! git diff --cached --quiet; then
+            git commit -m "deploy: ${GITHUB_SHA}" -a
+          fi
+
     
       - name: Push changes
         uses: ad-m/github-push-action@master