commit | author | age | ||
5ce9b0 | 1 | #!/bin/sh |
JG | 2 | |
918492 | 3 | REPO_DIR=$HOME/sites |
JG | 4 | SITE_DIR=repo |
5 | DEPLOY_DIR=/Eduardo/repo | |
6 | ||
7 | cd $REPO_DIR/$SITE_DIR | |
8 | ||
9 | # Check for repo update | |
5ce9b0 | 10 | if [ -n "$(git pull --ff-only | grep 'Already up to date.')" ]; then |
JG | 11 | exit |
918492 | 12 | fi |
5ce9b0 | 13 | echo "Updating $SITE_DIR site" |
918492 | 14 | |
JG | 15 | # Build site |
5ce9b0 | 16 | hugo 2>&1 >/dev/null |
918492 | 17 | |
JG | 18 | # sync new files across |
5ce9b0 | 19 | rsync -a public/* $DEPLOY_DIR/ |
918492 | 20 |