diff --git a/scripts/zola.sh b/scripts/zola.sh index 1d10272..e036eeb 100755 --- a/scripts/zola.sh +++ b/scripts/zola.sh @@ -104,8 +104,8 @@ deploy() { git checkout --orphan $1 else echo "[*] Deployment branch $1 exists, pulling changes from remote" - git pull origin $1 --force - git checkout $1 + git fetch origin $1 + git switch $1 fi git rm -rf . @@ -114,6 +114,7 @@ deploy() { git add --all if [ -n $(git status --porcelain) ]; then + echo "[*] Repository has changed, committing changes" git commit \ --author="$3" \ --message="new deploy: $(date --iso-8601=seconds)"