Created
January 31, 2013 09:39
-
-
Save alexblackie/4681698 to your computer and use it in GitHub Desktop.
Deploy a Middleman site by building it server-side on a Git post-receive (making deployment as easy as "git push").
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Simply point your virtualhost to the GIT_WORK_TREE below, with "/build" appended. (ex: /path/to/webroot/example.com/build) | |
# This is how I manage all of my sites. I highly recommend this setup. | |
GIT_WORK_TREE=/path/to/webroot/example.com # Set this to your webroot path (sans build) | |
export GIT_WORK_TREE | |
git checkout -f | |
# Enter Directory | |
cd $GIT_WORK_TREE | |
# Install Gems | |
bundle install | |
# Build Middleman | |
bundle exec middleman build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment