From 91849229d535bc15f7bc165afcf2c0f963db9909 Mon Sep 17 00:00:00 2001 From: Joel Grunbaum <joelgrun@gmail.com> Date: Tue, 31 Aug 2021 05:49:47 +0000 Subject: [PATCH] build and deploy hugo site --- hugo-sync.sh | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/hugo-sync.sh b/hugo-sync.sh new file mode 100755 index 0000000..5e31bad --- /dev/null +++ b/hugo-sync.sh @@ -0,0 +1,18 @@ +REPO_DIR=$HOME/sites +SITE_DIR=repo +DEPLOY_DIR=/Eduardo/repo + +cd $REPO_DIR/$SITE_DIR + +# Check for repo update +if [[ -n $(git pull | grep 'Already up to date.') ]]; then +# exit + echo 1 +fi + +# Build site +hugo + +# sync new files across +rsync -av public/* $DEPLOY_DIR/ + -- Gitblit v1.9.3