Class: BeamUp::Providers::Statichost

Inherits:
Base
  • Object
show all
Defined in:
lib/beam_up/providers/statichost.rb

Defined Under Namespace

Classes: Config

Constant Summary collapse

BUILDER_HOST =
"https://builder.statichost.eu"

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from BeamUp::Providers::Base

Instance Method Details

#deploy!(path) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/beam_up/providers/statichost.rb', line 29

def deploy!(path)
  @path = path

  zipped_file = create_zip path
  response = upload zipped_file

  Result.new(
    provider: "Statichost",
    deploy_id: response["id"] || Time.now.to_i.to_s,
    url: "https://#{@configuration.site_name}.statichost.eu"
  )
rescue => error
  Result.new(provider: "Statichost", error: error.message)
ensure
  zipped_file&.close!
end