Skip to content

Commit

Permalink
Only commit when changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Twinki14 committed Sep 29, 2024
1 parent 3c30cf2 commit fd0f5e5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ jobs:
# Add the entire /preview folder to Git
git add preview
git commit -m "Update - /preview"
# Commit changes if there are any
git diff --quiet && git diff --staged --quiet || git commit -m "Update - /preview"
# git add all *.yaml, *.yml, *.json, and *.html files in the root dir
# for every file added, do a git commit of "Update - <file-name>.json"
Expand All @@ -132,7 +134,8 @@ jobs:
# Add all specified files in the root directory
git add *.yaml *.yml *.json *.html
git commit -m "Update - /"
# Commit changes if there are any
git diff --quiet && git diff --staged --quiet || git commit -m "Update - /"
- name: Push
run: git push origin gh-pages

0 comments on commit fd0f5e5

Please sign in to comment.