Continuous Deployment of Octopress Website with Prose.io and Jenkinsleena
May 4, 2013
As mentioned in this blog post, we were looking for a simple solution for Live Editing the website created using Octopress and deploy it to Heroku. This post is about how to edit Website using Prose.io and deploy it using Jenkins.
With Prose.io, you can edit any Github files, but you need to run
rake generate command for generating the HTML files before deploying them. So you will need the setup to deploy, even if the editing can be done online.
Follow the following steps to setup Jenkins or any Continuous Integration server for deployment:
- Add the following in _config.yml
title: "Change Title"
date: 2013-04-11 02:33
- author categories:
- All Posts
Setup Prose.io - just login with your Github Handle
Create a script with as follows:
bundle install bundle exec rake generate git add public/ git commit -m "Deploying Generated files"
- Install the Heroku gem and setup the git remote and keys for deployment as mentioned here
- Setup Git Publisher to push the generated files to heroku as shown below.
Thats it. You are done. Just by clicking of a button, the changes gets deployed. With this setup anyone who has access to the Github Repo can make changes and deploy.
This post is written using Prose.io and deployed through Jenkins.
Yes, the setup was not as easy I had written above. I got stuck mainly with the following.
- I got stuck as the command
rake generatewas watching the file changes. It was not getting stopped. The culprit was
auto: truein _config.yml file.
- If the file extension is .html, Prose.io will not show preview or metadata information. The markdown or md extension would work.
- Thought of using Travis.io as mentioned here for the deployment. But had issues with setting up Heroku setup with the same. Didn’t continue on that as we’ve been using Jenkins as our CI server for long.