From 82d6d2ca4fac51437ad07e2e90a81c53fad101d1 Mon Sep 17 00:00:00 2001
From: Maxim Thomas <maxim.thomas@gmail.com>
Date: Wed, 30 Oct 2024 14:50:53 +0000
Subject: [PATCH] depoloy.yml: Fix documents deploy  (#449)

---
 .github/workflows/deploy.yml |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 74aa997..105a62d 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -157,5 +157,8 @@
           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

--
Gitblit v1.10.0