Created
February 23, 2009 20:48
-
-
Save roidrage/69166 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
set :application, "host.name" | |
set :domain, "host.name" | |
set :repository, "[email protected]:user/jekyll-blog.git" | |
set :use_sudo, false | |
set :deploy_to, "/var/www/#{application}" | |
ssh_options[:forward_agent] = true | |
default_run_options[:pty] = true | |
role :app, domain | |
role :web, domain | |
role :db, domain, :primary => true | |
set :scm, :git | |
set :deploy_via, :remote_cache | |
default_run_options[:pty] = true | |
namespace :deploy do | |
task :restart, :roles => :app do | |
end | |
task :start, :roles => :app do | |
# nothing | |
end | |
task :stop, :roles => :app do | |
# nothing | |
end | |
task :finalize_update do | |
# nothing | |
end | |
end | |
namespace :jekyll do | |
desc "Generates the site on the remote server" | |
task :generate_site do | |
run "cd #{current_release} && rake site:generate" | |
end | |
desc "Update the jekyll gem" | |
task :update_gem do | |
run "gem install mojombo-jekyll" | |
end | |
end | |
after "deploy:update_code", "jekyll:generate_site" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task :default => "site:generate" | |
namespace :site do | |
task :jekyll => :pre do | |
sh "PATH=$PATH:~/.gem/ruby/1.8/bin jekyll --lsi" | |
end | |
namespace :jekyll do | |
task :server do | |
sh "jekyll --server --lsi" | |
end | |
end | |
task :purge do | |
sh "rm _site/Capfile _site/README.markdown _site/Rakefile" | |
end | |
task :generate => ["jekyll", "purge"] | |
task :clean do | |
sh "rm -rf _site" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment