Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

Print cloud.gov environment variables to ensure they're what they're supposed to be #672

Merged
merged 1 commit into from
Sep 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions _plugins/siteurl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
# it'll just cause a 404.
#
# We can avoid all that by just emptying the site.url value on preview builds.
puts "============== Pages environment check =============="
puts "BRANCH: . . #{ENV['BRANCH']}"
puts "OWNER: . . . #{ENV['OWNER']}"
puts "REPOSITORY: #{ENV['REPOSITORY']}"
puts "SITE_PREFIX: #{ENV['SITE_PREFIX']}"
puts "BASEURL: . . #{ENV['BASEURL']}"

branch = ENV['BRANCH']
if !(branch.nil? || branch == 'main')
site.config['url'] = nil
Expand Down