Class: BeamUp::Providers::Netlify

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

Defined Under Namespace

Classes: Config

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



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/beam_up/providers/netlify.rb', line 27

def deploy!(path)
  @path = path
  digested_files = digested files_to_deploy
  response = post "/sites/#{project_id}/deploys", files: digested_files

  upload(files_to_deploy, response)

  Result.new(
    provider: "Netlify",
    deploy_id: response["id"],
    url: response["deploy_ssl_url"] || response["ssl_url"]
  )
rescue => error
  Result.new(provider: "Netlify", error: error.message)
end