Skip to content

Instantly share code, notes, and snippets.

@nakajima
Created August 6, 2008 06:21
Show Gist options
  • Select an option

  • Save nakajima/4180 to your computer and use it in GitHub Desktop.

Select an option

Save nakajima/4180 to your computer and use it in GitHub Desktop.
Deploy from a gist.
# Use this Capfile to deploy a gist via Capistrano.
#
# If the gist you want to deploy is here: http://gist.github.com/3401,
# just fill in the appropriate server settings (domain, deploy_to, etc)
# and run the following command:
#
# cap deploy GIST=3401
#
# You might need to run cap deploy:setup first.
load 'deploy' if respond_to?(:namespace)
set :application, "some-app"
set :deploy_to, "/home/rails/#{application}"
set :deploy_via, :remote_cache
set :user, "deploy"
set :scm, "git"
set :branch, "master"
set :domain, 'somewhere.your-domain.com'
role :web, domain
role :app, domain
role :db, domain, :primary => true
before 'deploy', 'get_gist'
task :get_gist do
set :repository, "git://gist.github.com/#{ENV['GIST']}.git"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment