diff --git a/config/custom-environment-variables.yaml b/config/custom-environment-variables.yaml index 66c195b233..ccb4eea383 100644 --- a/config/custom-environment-variables.yaml +++ b/config/custom-environment-variables.yaml @@ -5,3 +5,6 @@ googleAnalytics: trackingID: CONFIG_GOOGLE_ANALYTICS_TRACKING_ID anonymizeIP: CONFIG_GOOGLE_ANALYTICS_ANONYMIZE_IP + +# Site Url +siteUrl: CONFIG_SITE_URL diff --git a/docusaurus.config.js b/docusaurus.config.js index e1b4733f07..5cd550e3e9 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -9,11 +9,17 @@ const googleAnalyticsConfig = cfg.has("googleAnalytics") ? cfg.get("googleAnalytics") : undefined +const siteUrl = cfg.has("siteUrl") + ? cfg.get("siteUrl") + : process.env["NETLIFY"] + ? process.env["DEPLOY_URL"] + : "http://localhost:3000" + /** @type {import('@docusaurus/types').Config} */ const config = { title: "Gruntwork Docs", tagline: "Your entire infrastructure, defined as code, in about a day.", - url: "https://your-docusaurus-test-site.com", + url: siteUrl, baseUrl: "/", favicon: "/favicon.ico", organizationName: "gruntwork-io", // Usually your GitHub org/user name. diff --git a/scripts/push-to-s3-prod.sh b/scripts/push-to-s3-prod.sh index 2351c47a3e..fa5aa95601 100755 --- a/scripts/push-to-s3-prod.sh +++ b/scripts/push-to-s3-prod.sh @@ -2,6 +2,8 @@ set -e +export CONFIG_SITE_URL="https://docs.gruntwork.io" + yarn --ignore-optional && yarn build aws s3 cp --recursive build/ s3://docs.gruntwork.io diff --git a/scripts/push-to-s3-stage.sh b/scripts/push-to-s3-stage.sh index e18c32dad3..a909630249 100755 --- a/scripts/push-to-s3-stage.sh +++ b/scripts/push-to-s3-stage.sh @@ -7,6 +7,8 @@ set -e unset CONFIG_GOOGLE_ANALYTICS_TRACKING_ID unset CONFIG_GOOGLE_ANALYTICS_ANONYMIZE_IP +export CONFIG_SITE_URL="https://docs.dogfood-stage.com" + yarn --ignore-optional && yarn build aws s3 cp --recursive build/ s3://docs.dogfood-stage.com