Class: Vapid::Deployer
Overview
Deploys to Vapid’s hosting service
Constant Summary collapse
- MIMES =
{ "text/css" => "css", "application/javascript" => "js", "text/html" => "html" }.freeze
Instance Method Summary collapse
- #deploy(project_files, &cli) ⇒ Object
-
#initialize(api_key, site_id) ⇒ Deployer
constructor
A new instance of Deployer.
Constructor Details
Instance Method Details
#deploy(project_files, &cli) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/vapid/deployer.rb', line 21 def deploy(project_files, &cli) @cli = cli @project_files = project_files @manifest = {} @site_changed = false begin config_server prepare_build_dir build_site return unless upload_files update_site rescue Exception => e cli_say "Deploy Error: #{e.}", color: :red end end |