Prose.io + Octopress + Travis-CI + GitHub Pages = ♥
I wanted to have nice workflow to write to my octopress-powered blog. So idea was:
- I’m editing or creating post in Prose.io or just in GitHub’s web editor.
- Wonderful open-source free hosted continious integration server Travis-CI builds my Octopress blog and pushes generated version back to GitHub Pages
Nice settings for Prose.io to edit Octopress blog
First, I need Prose.io to be nice with octopress. I added these lines to end of
_config.yml of Octopress blog:
``` prose: rooturl: “source” metadata:
"source/_posts": | layout: post title: "Title" comments: true categories: published: true
Thats exactly what it looks like. It tells Prose.io, which directory to load, and specifies Octopress’s metadata.
It’s a pain. This is my
It’s kinda complex :) You just have to put your encoded SSH key instead of mine (
all - secure: lines) and put your repo address (
- REPO=). To encode SSH key for Travis I used this gist:
It works like magic!
PS. So, it builds on Travis twice. First time when you are pushing to
source branch – Travis generates static site and pushes it back to
master branch (to GitHub Pages). That push triggers second build on Travis, although I have
branches: only: source in my
source branch. As workaround, I’m echoing
script: "ls *.html" to
.travis.yml. Still, on each my blog update, Travis creates 2 VM. I hope it’s not so abusive.