This Sinatra web app is used to update your Octopress blog automatically. When you make change to your blog and push up to Github, your changes will be pulled down and your blog will be regenerated.
Slick! Nothing is free, so you'll have to do a bit of configuration.
- Fork: https://github.com/austenito/heroku-buildpack-ruby-octopress
config.yml, edit the following:
- git_url - The read only URL of the blog you want to deploy on Heroku.
- git_branch - The branch your blog resides in.
- Push your changes. When you deploy this repository on Heroku will pull this buildpack to setup and generate your blog.
Admin section of your blog's Github repo add a post-receive URL. For example,
http://www.jumpstartlab.com/generate. A POST request will be submitted whenever you commit changes to your blog. This is how the server will pull your blog's latest changes from Github and generate the new static content.
For security, you may want to generate a hash string that will be difficult for people to guess.
- Clone this repository.
config.ymladd the relative post-receive URL you added in the admin section of your blog on Github. Using the example above, you would use:
rake --rakefile setup.rake
- Deploy your blog!
heroku create --stack cedar --buildpack <your_buildpack_fork_git_url> git add . git commit -m "Your commit message" git push heroku master
rake setupin your buildpack repository changes the following lines in octopress.rb
pipe("env PATH=$PATH git remote add upstream ##git_url##") pipe("env PATH=$PATH git pull upstream ##git_branch##")
rake -rakefile setup.rakein this repository finds and replaces the post_receive_hook_url in server.rb
get /##git_post_receive_url##/ do