Last active
August 29, 2015 14:03
-
-
Save mneil/fc699650f6472c746d99 to your computer and use it in GitHub Desktop.
Capistrano Production deploy by Tag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
role :app, %w{[email protected]} | |
role :app, %w{[email protected]} | |
role :app, %w{[email protected]} | |
set :deploy_to, '/home/user/wp' | |
server '0.0.0.0', user: 'user', roles: %w{web app} | |
set :branch do | |
default_tag = `git tag`.split("\n").last | |
tag = Capistrano::CLI.ui.ask "Tag to deploy (make sure to push the tag first): [#{default_tag}] " | |
tag = default_tag if tag.empty? | |
tag | |
end | |
server '0.0.0.0', | |
user: 'user', | |
roles: %w{web app}, | |
ssh_options: { | |
user: 'user', # overrides user setting above | |
keys: %w(~/.ssh/id_rsa), | |
forward_agent: true, | |
auth_methods: %w(publickey password) | |
# password: 'please use keys' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment