From 02d31a2f2cd4d8ccf4da6702bf43ef6d9e8b0669 Mon Sep 17 00:00:00 2001 From: penev92 Date: Wed, 13 Dec 2023 22:41:49 +0200 Subject: [PATCH] Fix documentation workflow always trying to commit Don't try to commit and push if there is nothing to commit, because git will exit with 1, failing the workflow. A continuation of ca6b87d05e9718b2a1e15835e6ad89ea15088abe. --- .github/workflows/documentation.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index cff966d0fd..9d7c8211d7 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -87,6 +87,7 @@ jobs: cd wiki git config --local user.email "actions@github.com" git config --local user.name "GitHub Actions" + git status git diff-index --quiet HEAD || \ ( git add --all && \ @@ -140,6 +141,7 @@ jobs: cd docs git config --local user.email "actions@github.com" git config --local user.name "GitHub Actions" + git status git diff-index --quiet HEAD || \ ( git add api/*.md && \