How to Configure Capistrano to Deploy from Local Git Repository?

后端 未结 6 2045
别跟我提以往
别跟我提以往 2021-01-30 03:25

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

6条回答
  •  心在旅途
    2021-01-30 03:38

    I used a combination of @Ariejan and @HungYuHei answers which worked for me.

    set :deploy_via, :copy
    set :use_sudo, false    
    set :scm, "git"
    set :repository, "."
    set :local_repository, "."
    set :branch, "master"
    

    If you use local copy (and don't have the project on Github), then it is also wise to disable :check_revision task in your deploy.rb which checks whether remote is in sync with local git.

提交回复
热议问题