mirror of
https://codeberg.org/Codeberg-CI/examples.git
synced 2025-08-04 04:15:58 -04:00
[mdBook template]: Fix issue causing mdBook pipeline to return failure when pushing changes that don't modify the mdBook (#88)
`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. Reviewed-on: https://codeberg.org/Codeberg-CI/examples/pulls/88 Reviewed-by: crapStone <codeberg@crapstone.dev> Co-authored-by: carnivorecookies <carnivorecookies@noreply.codeberg.org> Co-committed-by: carnivorecookies <carnivorecookies@noreply.codeberg.org>
This commit is contained in:
parent
139788d318
commit
fdb4c09d70
@ -49,5 +49,4 @@ steps:
|
|||||||
- cp .domains $CI_REPO_NAME || true
|
- cp .domains $CI_REPO_NAME || true
|
||||||
- cd $CI_REPO_NAME
|
- cd $CI_REPO_NAME
|
||||||
- git add .
|
- git add .
|
||||||
- git commit -m "Woodpecker CI ${CI_BUILD_CREATED}"
|
- if ! git diff --cached --quiet; then git commit -m "Woodpecker CI ${CI_BUILD_CREATED}" && git push; fi
|
||||||
- git push
|
|
Loading…
x
Reference in New Issue
Block a user