From 075aaf2a39c6c35d67f0b9863c2834713b5b9ee9 Mon Sep 17 00:00:00 2001 From: Jacob Janzen Date: Fri, 8 Nov 2024 16:41:38 -0600 Subject: this should fix it --- deploy.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 deploy.sh (limited to 'deploy.sh') diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..1e15d57 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +if [ "$1" = "dev" ]; then + branch=dev + location='/var/www/html-test' +elif [ "$1" = "prod" ]; then + branch=main + location='/var/www/html' +fi + +cd ~/website || exit +git checkout "$branch" +git pull + +cd ~/.dotfiles || exit +git checkout "$branch" +git pull + +cd ~/blog || exit +git checkout "$branch" +git pull + +cd ~/.dotfiles || exit +~/website/fix-dotfile-paths.sh +emacs --batch -f package-initialize --script ~/website/publish.el +~/website/post-publish.sh + +cp -r public_html/* "$location" -- cgit v1.2.3