diff --git a/scripts/zola.sh b/scripts/zola.sh index 8916e70..c116d4f 100755 --- a/scripts/zola.sh +++ b/scripts/zola.sh @@ -100,8 +100,11 @@ deploy() { if [[ -z $(git branch --list $1) ]] then + "[*] Creating deployment branch $1" git checkout --orphan $1 else + "[*] Deployment branch $1 exists, pulling changes from remote" + git pull origin $1 --force git checkout $1 fi @@ -109,7 +112,7 @@ deploy() { /bin/rm -rf * cp -r $tmp_dir/* . git add --all - if [ ! -z $(git status --porcelain) ]; + if [ -n $(git status --porcelain) ]; then git commit \ --author="$3" \