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 capistra
Capistrano 3 solution which is running for me:
before :deploy, :deploy_from_local_repo
task :deploy_from_local_repo do
set :repo_url, "file:///tmp/.git"
run_locally do
execute "tar -zcvf /tmp/repo.tgz .git"
end
on roles(:all) do
upload! '/tmp/repo.tgz', '/tmp/repo.tgz'
execute 'tar -zxvf /tmp/repo.tgz -C /tmp'
end
end
Before deploying you are uploading a tar.gz file to the server, unzip and finally reset the :repo_url to file mode.
Take care to remove the pervious repo:
task :remove_repo do
on roles(:all) do
execute "rm -r #{repo_path}"
end
end