mirror of https://github.com/Chizi123/Scripts.git

Joel Grunbaum
2021-08-31 91849229d535bc15f7bc165afcf2c0f963db9909
build and deploy hugo site
1 files added
18 ■■■■■ changed files
hugo-sync.sh 18 ●●●●● patch | view | raw | blame | history
hugo-sync.sh
New file
@@ -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/