namespace :deploy do
  desc "compiles assets locally then rsyncs"
  task :upload_secrets do
    on roles(:app) do |role|
      run_locally do
        execute"rsync -av ./config/secrets.yml #{role.user}@#{role.hostname}:#{shared_path}/config/secrets.yml;"
      end
      "chmod -R 755 #{shared_path}/config/secrets.yml"
      execute "ln -nfs #{shared_path}/config/secrets.yml #{current_path}/config/secrets.yml"
    end
  end
end
