From 717fb98c1ac275e9bff5501ad4e1b7c19cc42330 Mon Sep 17 00:00:00 2001 From: maximthomas Date: Tue, 29 Oct 2024 20:31:14 +0300 Subject: [PATCH] fix docs push warring when there are no changes --- .github/workflows/deploy.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 74aa99787c..105a62dcb5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -157,5 +157,8 @@ jobs: rm -rf ${REPO_NAME_LC}/modules cp -R ../${SITE_DOC_FOLDER}/target/asciidoc/antora/modules ../doc.openidentityplatform.org/${REPO_NAME_LC} git add -A - git commit -a -m "upload ${{github.event.repository.name}} docs after deploy ${{ github.sha }}" - git push --force https://github.com/OpenIdentityPlatform/doc.openidentityplatform.org.git + if ! git diff-index --quiet HEAD; then + echo "committing changes to the docs repository" + git commit -a -m "upload ${{github.event.repository.name}} docs after deploy ${{ github.sha }}" + git push --force https://github.com/OpenIdentityPlatform/doc.openidentityplatform.org.git + fi