Skip to content

Instantly share code, notes, and snippets.

@rebelcolony
Forked from uhlenbrock/deploy.rb
Last active December 11, 2015 03:38
Show Gist options
  • Save rebelcolony/4539075 to your computer and use it in GitHub Desktop.
Save rebelcolony/4539075 to your computer and use it in GitHub Desktop.
set :application, 'appname'
set :deploy_to, "/var/www/apps/appname"
set :repository, '_site'
set :scm, :none
set :deploy_via, :copy
set :branch, "master"
set :copy_compression, :gzip
set :use_sudo, false
set :host, '72.14.189.999'
role :web, host
role :app, host
role :db, host, :primary => true
ssh_options[:port] = 9999
ssh_options[:forward_agent] = true
set :user, 'rebel'
set :group, user
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
%(rm -rf _site/*)
%(&& jekyll)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment