From a1ddb62867945b6bd55218e771271c89b1e35664 Mon Sep 17 00:00:00 2001 From: carnivorecookies Date: Fri, 18 Apr 2025 17:03:11 +0000 Subject: [PATCH] Fix bug causing pipelines to "fail" when files unrelated to mdBook are updated. `git commit` returns 1 if there is nothing to commit, meaning that if you `git push` any changes that don't modify the mdBook, `git` will return failure because there is nothing to commit, causing the pipeline to return failure. Adding a basic `git diff` check resolves this issue. --- Mdbook/.woodpecker.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Mdbook/.woodpecker.yaml b/Mdbook/.woodpecker.yaml index 470439a..18773eb 100644 --- a/Mdbook/.woodpecker.yaml +++ b/Mdbook/.woodpecker.yaml @@ -49,5 +49,4 @@ steps: - cp .domains $CI_REPO_NAME || true - cd $CI_REPO_NAME - git add . - - git commit -m "Woodpecker CI ${CI_BUILD_CREATED}" - - git push + - if ! git diff --cached --quiet; then git commit -m "Woodpecker CI ${CI_BUILD_CREATED}" && git push; fi \ No newline at end of file