aboutsummaryrefslogtreecommitdiff
path: root/deploy.sh
diff options
context:
space:
mode:
authorJacob Janzen <jacob.a.s.janzen@gmail.com>2024-12-29 11:07:33 -0600
committerJacob Janzen <jacob.a.s.janzen@gmail.com>2024-12-29 11:07:33 -0600
commit666cd6aad23d7d765f9840d647b02f50f19af314 (patch)
treeddd6c593d5c000b832a4b9ab616854540db1722e /deploy.sh
parent973534e796a75ff8be33667286307ea9ebe0b2a5 (diff)
cleanup repos before publish
Diffstat (limited to 'deploy.sh')
-rwxr-xr-xdeploy.sh9
1 files changed, 7 insertions, 2 deletions
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