Skip to content

Instantly share code, notes, and snippets.

@elidickinson
Last active December 13, 2015 17:48
Show Gist options
  • Save elidickinson/4950272 to your computer and use it in GitHub Desktop.
Save elidickinson/4950272 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Get the directory that this script is running from and cd to there
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR
echo "Deploying $DIR"
# tell hyde to rebuild whole site to production_deploy and note the
# script will bail out if hyde returns an error
hyde gen -c production.yaml -r -d production_deploy/ || exit $?
# copy only changed files to the server
rsync -cvraz --delete production_deploy/* [email protected]:/var/www/
echo "done."
extends: site.yaml
mode: production
@elidickinson
Copy link
Author

I wrote a blog post explaining this script: http://esd.io/blog/example-hyde-deploy-script.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment