Depends on:
- Octopress git repo
- tar
- rsync
- rake
Fill in the variables appropriately and copy to hooks/post-receive in your bare git repo
- git_branch: git branch which holds the source files for the live site
- file_bashrc: path to a ,bashrc (or really any bash file) which provides rbenv and adds a PATH directory containing rake
- dir_tmp: what directory to create a temporary copy of the $git_branch index inside of. THIS DIRECTORY WILL BE DESTROYED BY THE cleamTmp CALL AT THE END OF THE SCRIPT. It will also be automatically created if it does not yet exist.
- dir_src: The directory which Octopress compiles the static html files into. By default, the tree subdirectory 'public/'
- dir_live: Webroot directory
Copy configured script to hooks/post-receive in the bare repository on the remote end.
Another note, use
#/bin/bash -l
with the-l
argument.I had issue loading rvm from
$HOME/.bashrc
without this argument.Thanks a lot for your script :)