Skip to content

Instantly share code, notes, and snippets.

@imathis
Created May 25, 2012 14:10
Show Gist options
  • Save imathis/2788340 to your computer and use it in GitHub Desktop.
Save imathis/2788340 to your computer and use it in GitHub Desktop.
Automated Drafts in Octopress

Why I don't like automated time delayed publishing of drafts in Octopress:

  1. It's not hard to publish a draft when you want to.
  2. It may be hard to set up due to development environment issues.
  3. There are lots of edge cases that aren't obvious at first. Supporting this won't be easy.
  4. People could accidentally push a broken site.

Example

You're working on a plugin for Octopress and your task timer goes off. Your blog just starts generating and deploying in the background but you're in a development branch working on some feature. Result: your script generates your test site, but not your blog, and pushes it live in the background.

@jarrettmeyer
Copy link

Let me clarify what this code does and how it works.

  1. My blog is at ~/projects/blog. This Rakefile is at ~/projects/deploy-blog, and it is completely separate from your blog location.
  2. The Rakefile fetches a new copy of your blog from source control to ~/projects/deploy-blog/blog. So it's only going to grab what you've checked and pushed to master. If it's not production ready, don't push it to origin/master. This leaves you free to write new posts, work on plugins, etc. in your ~/projects/blog directory.

That said, I completely agree with all your points. This is not something that should be integrated into Octopress core. I agree that this would be a pain to support. I agree that this covers only a fraction of possible deployment scenarios. I am used to continuous deployment scenarios in my work life. I am used to push, build, test, deploy automation. I am used to heroku, where if you push to origin/master, it's considered production ready. For me, this kind of application is not new.

For most bloggers out there, you're probably correct to expect chaos.

I'd much rather you spend your time on keeping the gems up to date and coming up with shiny new features!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment