lib/mina/infinum/tasks.rb in mina-infinum-1.1.4 vs lib/mina/infinum/tasks.rb in mina-infinum-1.2.0

- old
+ new

@@ -16,5 +16,16 @@ task :restart do comment "Restarting #{background_worker_name}" command %(sudo stop #{background_worker_name} > /dev/null 2>&1; sudo start #{background_worker_name}) end end + +task :publish_api_doc do + ensure!(:publish_api_path) + run(:remote) do + command "mkdir -p #{fetch(:current_path)}/public/#{fetch(:publish_api_path)}" + end + + run(:local) do + command "scp -P #{fetch(:port)} public/#{fetch(:publish_api_path)}/index.html #{fetch(:user)}@#{fetch(:domain)}:#{fetch(:current_path)}/public/#{fetch(:publish_api_path)}" + end +end