Here is my command log to setup this this blog with octopress on github pages.
# Create new EC2 intance(micro)
yum update
yum install make git ruby-devel gcc rdoc zlib-devel
# Install rvm
curl -L https://get.rvm.io | bash -s stable
source "$HOME/.rvm/scripts/rvm"
# Install ruby1.9.3
rvm get head
rvm install 1.9.3
rvm use 1.9.3
# Install bundler
gem install bundler
# Install octpress
git clone git://github.com/imathis/octopress.git octopress
cd octopress
bundle install --path vendor
rake setup_github_pages # answer your github page url
rake install
# Build and deploy
rake generate
rake deploy
Note that user permission and current folders are not considered carefully.