1
0
mirror of https://github.com/danbee/danbarber.me synced 2025-03-04 08:59:10 +00:00

Use correct URL

This commit is contained in:
Daniel Barber 2018-01-25 14:03:38 -05:00
parent 592bc9b169
commit 0af625453d
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8

View File

@ -5,15 +5,20 @@ task default: %w[build]
desc "Build the site"
task :build do
puts "Deploying for: #{site_url}"
config = Jekyll.configuration(config_params)
site = Jekyll::Site.new(config)
Jekyll::Commands::Build.build site, config
end
def config_params
if ENV["URL"]
{ url: ENV["URL"] }
if site_url
{ url: site_url }
else
{}
end
end
def site_url
ENV["DEPLOY_URL"]
end