docs/cookbook.md in mina-1.0.7 vs docs/cookbook.md in mina-1.1.0
- old
+ new
@@ -1,9 +1,8 @@
-Cookbook
---------------------
+# Cookbook
-# Multi environment deploy
+## Multi environment deploy
``` ruby
# deploy.rb
set :domain, '...'
@@ -28,8 +27,40 @@
```
$ mina staging deploy
$ mina production deploy
```
+## Copy `config/application.yml` to your server
+```
+task :deploy do
+ run(:local) do
+ comamnd "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*