Sha256: e6f6c71f953625b04023f283cbb0a2772ae0c2eb2174198052e86670cb617c96
Contents?: true
Size: 1.05 KB
Versions: 2
Compression:
Stored size: 1.05 KB
Contents
# Cookbook ## Multi environment deploy ``` ruby # deploy.rb set :domain, '...' task :staging do set :deploy_to, 'home/deploy/www/app-staging/' set :rails_env, 'staging' set :branch, 'develop' end task :production do set :deploy_to, 'home/deploy/www/app/' set :rails_env, 'production' set :branch, 'master' end task :deploy do ... end ``` ``` $ mina staging deploy $ mina production deploy ``` ## Copy `config/application.yml` to your server ``` task :deploy do run(:local) do command "scp config/application.yml #{fetch(:user)}@#{fetch(:domain)}:#{fetch(:shared_path)}/config/application.yml" end deploy do invoke ... end end ``` ## Deploy plain HTML websites ``` require 'mina/git' require 'mina/deploy' ... desc "Deploys the current version to the server." task :deploy do deploy do invoke :'git:clone' invoke :'deploy:cleanup' on :launch do in_path(fetch(:current_path)) do command %{npm install} end end end end ``` ------------------------------- \* *feel free to add your own recipes*
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mina-1.2.5 | docs/cookbook.md |
mina-1.2.4 | docs/cookbook.md |