Quick Capistrano 3 question.
I am using Capistrano to deploy a CMS to a staging environment and then to production.
I need to upload a configuration file with database info with the CMS that lives outside of the git repo.
There are two config files staging-config and production-config.
How can I get Capistrano to upload a file or execute a task based on the target?
task :upload_config do
on roles(:all) do |host|
within fetch(:shared_path) do
upload! 'staging-config.php', "#{fetch :shared_path}/staging-config.php"
end
end
end