Skip to content

Instantly share code, notes, and snippets.

@tannerburson
Created February 15, 2010 03:05
Show Gist options
  • Select an option

  • Save tannerburson/304394 to your computer and use it in GitHub Desktop.

Select an option

Save tannerburson/304394 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby -rubygems
$:.unshift(File.dirname(__FILE__))
require 'deploy-script'
Deploy::app :name do
@app_path = '/path/to/blog' # cd to this directory before anything else
@repo_url = 'git://github.com/tannerburson/blog.tannerburson.com.git'
end
deploying :name do
update ['rm -rf backup',
'cp -R release backup', #backup the last release
'rm -rf release',
"git clone #{@repo_url} release"] # pull down the latest
start "cd #{@app_path}/release && jekyll"
stop
# deploy automatically calls update, start, stop if they've been specified
deploy
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment