Move hosting to new vps setup, and add deploy script

This commit is contained in:
David Thurstenson 2021-10-04 20:54:10 -05:00
parent 2eb197e0fd
commit 3edaf126dc
2 changed files with 14 additions and 0 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
public/**
deploy_id

13
deploy Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
# To auto-deploy this on git push, add a symlink at .git/hooks/pre-push that points to this script
# Example: ln -s ../../deploy .git/hooks/pre-push
# Get the dir of the running script
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
# Pull variables in from deploy_id
source "$SCRIPT_DIR/deploy_id"
# Generate and push the output to the server
hugo && rsync -avz --delete public/ ${USER}@${HOST}:${DIR}