GSA-TTS / identity-idva-docs

Other
1 stars 0 forks source link

Add conditional logic to select between demo and prod Search.gov and Analytics keys #103

Closed astrogeco closed 1 year ago

astrogeco commented 1 year ago

Our pages dashboard contains environment variables for our demo and production instances. Currently, the build system requires us to overwrite those variables depending on the target build environment.

This change adds logic to choose between demo and prod based on keys added in the cloud pages build. Specifically,

  1. move the search.gov items currently in _config.yml to the additional build settings section for each environment
    • this requires using a different "affiliate" entry for each environment
  2. use the appropriate environment variable for the google analytics gtag

Note that this could probably be done more cleanly, effectively, efficiently but it seems to work for now...