From 666cd6aad23d7d765f9840d647b02f50f19af314 Mon Sep 17 00:00:00 2001 From: Jacob Janzen Date: Sun, 29 Dec 2024 11:07:33 -0600 Subject: cleanup repos before publish --- deploy.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'deploy.sh') diff --git a/deploy.sh b/deploy.sh index 055ea15..4999025 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,23 +1,28 @@ #!/bin/sh if [ "$1" = "test" ]; then - branch=test + branch='test' location='/var/www/html-test' elif [ "$1" = "prod" ]; then - branch=main + branch='main' location='/var/www/html' fi +rm -rf "$HOME/public_html" + cd ~/website || exit git checkout "$branch" +git clean -f git pull cd ~/dotfiles || exit git checkout "$branch" +git clean -f git pull cd ~/blog || exit git checkout "$branch" +git clean -f git pull cd ~/dotfiles || exit -- cgit v1.2.3