How to Configure Capistrano to Deploy from Local Git Repository?

DaneS picture DaneS · Apr 3, 2011 · Viewed 26.8k times · Source

What changes do I need to make to the deploy.rb file below to make it deploy my app from a local git repo? If I can't deploy from a local repo, can I have capistrano use the working copying instead?

set :application, "my_app"
set :repository, "."
set :local_repository, "file:///path/to/application/.git"
set :deploy_to, "/data/www/apps/#{application}"
set :deploy_via, :copy
set :copy_cache, true
set :user, "dane"
set :use_sudo, false

set :scm, :git # Should I change this to :none
set :branch, "master"

Answer

Ariejan picture Ariejan · Apr 4, 2011

That's easy:

set :scm, :none
set :repository, "."
set :deploy_via, :copy

Simply run Capistrano from the root of your project.