Method: Bard::Config#github_pages

Defined in:
lib/bard/config.rb

#github_pages(url) ⇒ Object

short-hand for michael



88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/bard/config.rb', line 88

def github_pages url
  urls = []
  uri = url.start_with?("http") ? URI.parse(url) : URI.parse("https://#{url}")
  hostname = uri.hostname.sub(/^www\./, '')
  urls = [hostname]
  if hostname.count(".") < 2
    urls << "www.#{hostname}"
  end

  server :production do
    github_pages true
    ssh false
    ping *urls
  end

  backup false
end