diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 8013aea..331a337 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -26,13 +26,17 @@ jobs:
- name: Replace placeholder with current date
run: |
DATE=`date +'%Y-%m-%d'`
- sed -i 's|.*|PLACEHOLDER|' index.html
- sed -i 's|PLACEHOLDER|'$DATE'|' index.html
+ sed -i 's|.*|'$DATE'|' index.html
git config --global user.name 'GitHub Actions'
git config --global user.email 'actions@github.com'
git add index.html
- git commit -m "Update index.html with current date"
- git push
+ if git diff --cached --quiet
+ then
+ echo "No changes to commit"
+ else
+ git commit -m "Update index.html with current date"
+ git push
+ fi
- name: Login to GitHub Container Registry
uses: docker/login-action@v3.1.0