From 680c71503ca118108a8004787aded7bc0db1d666 Mon Sep 17 00:00:00 2001 From: realaravinth Date: Sat, 16 Apr 2022 13:01:30 +0530 Subject: [PATCH] fix: commit only when website has been updated --- scripts/zola.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/zola.sh b/scripts/zola.sh index 9dffbd0..8916e70 100755 --- a/scripts/zola.sh +++ b/scripts/zola.sh @@ -109,9 +109,12 @@ deploy() { /bin/rm -rf * cp -r $tmp_dir/* . git add --all - git commit \ - --author="$3" \ - --message="new deploy: $(date --iso-8601=seconds)" + if [ ! -z $(git status --porcelain) ]; + then + git commit \ + --author="$3" \ + --message="new deploy: $(date --iso-8601=seconds)" + fi git checkout $original_branch }