From d36df52eca6d5e183f6f8f97c90e493e9ac967e8 Mon Sep 17 00:00:00 2001 From: Jack Jackson Date: Thu, 24 Mar 2022 20:59:53 -0700 Subject: [PATCH] DeployBlog.sh --- deployBlog.sh | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 deployBlog.sh diff --git a/deployBlog.sh b/deployBlog.sh new file mode 100755 index 0000000..1d63a91 --- /dev/null +++ b/deployBlog.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +set -e + +# -p +# $path should be the path to the root of the Hugo content +while getopts p: flag +do + case "${flag}" in + p) path=${OPTARG};; + esac +done + +if [ -z "$path" ]; then + echo "Path not set" + exit 1 +fi + +hugo --quiet --source $path + +cp -r $path/public ./blogContent +docker build -t scubbo/blog_nginx . -f-<