From edf62414eebb661729b6b6f564c6ce7a1be27d07 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 24 Jun 2025 21:14:52 +0200 Subject: [PATCH] Avoid workflow erroring if there's nothing to change --- .forgejo/workflows/build-website.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.forgejo/workflows/build-website.yaml b/.forgejo/workflows/build-website.yaml index ac6261f..d859b76 100644 --- a/.forgejo/workflows/build-website.yaml +++ b/.forgejo/workflows/build-website.yaml @@ -16,7 +16,11 @@ jobs: - run: | cd knots-pages git add . - git config user.email "" - git config user.name "Automatic website updater" - git commit -m "Automatic website update" - git push + if [[ -z "$(git status -s)" ]]; then + echo "Nothing to push" + else + git config user.email "" + git config user.name "Automatic website updater" + git commit -m "Automatic website update" + git push + fi