diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 28f55daaf6..a707e1bdc5 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -52,4 +52,8 @@ jobs: export MSG="[Auto] Latest versions as of $(date +'%Y-%m-%d %H:%M')" export DOC=docs/reference/latest-versions-of-every-openrewrite-module.md export JS=src/plugins/latest-versions.js - git diff-index --quiet HEAD ${DOC} || (git commit --message "${MSG}" ${DOC} ${JS} && git push origin master) + if ! git diff-index --quiet HEAD ${DOC}; + then + git commit --message "${MSG}" ${DOC} ${JS}; + git push origin master; + fi