Skip to content

Commit

Permalink
Update static.yml
Browse files Browse the repository at this point in the history
Update yaml to only commit if there are changes
  • Loading branch information
kelvinnguyenn authored Dec 5, 2024
1 parent ec8bd94 commit 373fecb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@ jobs:
run: |
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
# 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 }}
Expand Down

0 comments on commit 373fecb

Please sign in to comment.