Octopress publish Hazel action

The other day Doug asked that I share the Hazel action that automatically published my blog when a new post is added. On the publish folder I have a Hazel action that:

  • copies the post to my own plaintext archive,
  • moves the file to the octopress/source/_posts directory
  • modifies the filename to replace spaces with dashes

The last action in the stack is this:

cd /Users/benoit/octopress; /Users/benoit/.rvm/gems/ruby-1.9.3-p286@global/bin/rake generate && /Users/benoit/.rvm/gems/ruby-1.9.3-p286@global/bin/rake deploy; /usr/local/bin/growlnotify -a /Users/benoit/Library/PreferencePanes/Hazel.prefPane -m "Blog Publish Complete"

I have configured growlnotify to send me text messages via a modified MailMe action, so I can know when my site has been republished even when I am not at a computer.