Created
April 8, 2013 10:12
-
-
Save samurailink3/5335733 to your computer and use it in GitHub Desktop.
Octopress Post-Receive
This file contains 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/bash | |
# Make sure you have $HOME/git/working created already | |
# Put this file in a bare repository, configure Octopress for local deployment. | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
GEM_PATH=$GEM_PATH:$HOME/.gems | |
PATH=$PATH:$HOME/.gems/bin | |
site=www.example.com | |
GIT_WORK_TREE=$HOME/git/working git checkout -f | |
cd $HOME/git/working | |
bundle install | |
bundle exec rake generate | |
rm -rf /var/www/$site/* | |
cp -rf $HOME/git/working/public/* /var/www/$site/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment