aboutsummaryrefslogtreecommitdiff
path: root/deploy.sh
diff options
context:
space:
mode:
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