-
-
Save jpsilvashy/388870 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
set :application, 'foo' | |
set :repository, '_site' | |
set :scm, :none | |
set :deploy_via, :copy | |
set :copy_compression, :gzip | |
set :use_sudo, false | |
set :host, '127.0.0.1' | |
role :web, host | |
role :app, host | |
role :db, host, :primary => true | |
ssh_options[:port] = 30123 | |
set :user, 'username' | |
set :group, user | |
set(:dest) { Capistrano::CLI.ui.ask("Destination: ") } | |
if dest == 'dev' | |
set :deploy_to, "/home/#{user}/sites/dev.#{application}.com" | |
elsif dest == 'www' | |
set :deploy_to, "/home/#{user}/sites/#{application}.com" | |
end | |
before 'deploy:update', 'deploy:update_jekyll' | |
namespace :deploy do | |
[:start, :stop, :restart, :finalize_update].each do |t| | |
desc "#{t} task is a no-op with jekyll" | |
task t, :roles => :app do ; end | |
end | |
desc 'Run jekyll to update site before uploading' | |
task :update_jekyll do | |
%x(rm -rf _site/* && jekyll) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment