Deploy Octopress, the right way
This post explains how to deploy an Octopress page via Git · Wetteraukreis, GermanyYou’re deploying your Octopress blog via Git to GitHub Pages (or Heroku), but you don’t like Heroku and GitHub Pages are refreshing too slow and you really don’t want to use Rsync, do you?
Just deploy to your own server via Git.
Step one
If you haven’t already done this, run rake setup_github_pages
in your local Octopress repository and give it any valid GitHub url.
Step two
Set up a bare Git repository on your server to push to
Step two and a half
Create a post-receive
on your server in ~/projects/octopress.git/hooks/
and give yourself execute permissions with chmod u+x post-receive
.
#!/bin/bash
# You already know that you'll have to change the paths
Step three
Back in your local Octopress installation.
cd _deploy
git remote set-url origin user@domain.com:projects/octopress.git
git pull -u origin master # Where master is the branch you set in your Rakefile as deploy_branch, defaults to master
And you’re set. If you run into any trouble, let me know.