Method: Formatron::CLI::Deploy#deploy_action

Defined in:
lib/formatron/cli/deploy.rb

#deploy_action(c) ⇒ Object



34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/formatron/cli/deploy.rb', line 34

def deploy_action(c)
  c.action do |args, options|
    directory = deploy_directory options
    target = deploy_target args[0], directory
    formatron = Formatron.new(
      credentials: deploy_credentials(options),
      directory: directory,
      target: target
    )
    formatron.deploy if deploy_ok options, formatron, target
  end
end