could start blogging on any operating systems
have automatic deployment via travis-ci everytime you update the blog source like ours at https://travis-ci.org/teracy-official/blog
In case if you’re wondering:
devis a little virtual machine (VM) box that any Teraciers must use it to setup working environment. All the required runtime environment will be automatically setup there.
octopressis “A blogging framework for hackers.” I don’t think it’s for hackers anymore when you’re using Teracy’s
devfor blogging, it should be for everyone who knows how to type and a little bit of
Gitlearning. Do you? :–)
Ruby for its runtime environment,
Git for blog management.
To make it dead-simple and error-prone-free to start, we’re going to use Teracy’s
So let’s begin now, this could take you a little long time for setting up, but it’s worth it, believe me!
Step 1: Setup
Note that before
$ vagrant up as guided below, you need to enable forwarded-port on
octopress blog later (by removing the hash character (
#) at the beginning of the
Please follow the guide here at: http://dev.teracy.org/docs/getting_started.html
Step 2: Install
Please follow the guide here at: http://dev.teracy.org/docs/ruby_training.html#installation
Step 3: Setup
Rubywas already installed on the VM.
You need to make sure to register a Github account at https://github.com/
You must store your repository at
teracy-dev/workspace/personaldirectory or you could possibly loose it when
$ vagrant destroy. For example, to clone
1 2 3
$ ws is an alias provided by Teracy’s
dev to change directory to
workspace directory where all
your work must be kept there.
Please follow the official guide here at: http://octopress.org/docs/setup/ and make sure to deploy with Github Pages.
$ rake preview you should enable forwarded-port on the VM mentioned
from step 1 above.
$ rake preview and open your browser at:
http://localhost:4000 to preview the
After that, you could start blogging and enjoy it now. However, one very cool thing is that you
don’t have to
$ rake generate and then
$ rake deploy anymore, it should be automatically
done when you
push updates to your github repository like we did for Teracy’s official blog.
Step 4: Automatic deployment with travis-ci
1. Register travis-ci account at: http://travis-ci.org
2. Configure your project build
2.2. Provide your github user account and run the following command, for example, my account is
You could get the output something like this, you need to notice the “token” key:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
travis gem to generate “secure” key:
2.4. Generate “secure” key from your provided token, mine is something like:
And you will get the output something like below, you need to get “secure” key to configure travis-ci later.
1 2 3 4 5
.travis.yml like we did at
You need to replace these with yours accordingly:
- git config --global user.name "Hoat Le" - git config --global user.email "hoatlevan @ gmail . com" - GH_REPO="teracy-official/teracy-official.github.io" - secure: "f+g8tyvZYOYm+jUARCD5qLNMFkslYu26PwAFe8s4VzngJ2iv37T0yj5d8R40/cLIQ6LX+nHAltuJeNK786qjtiIuKuvHAypL0/3ZgVSN9XZAKnVvwh7fz7W7bETrJDkyk1WVSTini37CLSIdDS8lBg4iKHAhSuD35FZviuf/CbY="
If you setup blog as user/ organization page, you need to enable
source branch instead of
Rakefile like we did at
3. Finally, enable travis-ci build for your project
You should make a post,
push the change to see how travis-ci works.
Your blog should be running well now.
If you want to use Github custom domains, please head to: http://blog.teracy.com/2013/08/08/multiple-github-custom-domains/
Many thanks to:
http://rogerz.github.io/blog/2013/02/21/prose-io-github-travis-ci/ for automatic deployment work.
http://www.harimenon.com/blog/2013/01/27/auto-deploying-to-my-octopress-blog/ for twitter button fixing.