diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index eb4e0d2..0f25368 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -43,8 +43,12 @@ jobs: run: | git config --global user.name "github-actions" git config --global user.email "github-actions@github.com" + + # Check if there are any changes to commit git add . - git commit -m "Update directory listings" + git diff --quiet || git commit -m "Update directory listings" + + # Push only if there are changes git push env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}