Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions config/custom-environment-variables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@
googleAnalytics:
trackingID: CONFIG_GOOGLE_ANALYTICS_TRACKING_ID
anonymizeIP: CONFIG_GOOGLE_ANALYTICS_ANONYMIZE_IP

# Site Url
siteUrl: CONFIG_SITE_URL
8 changes: 7 additions & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions scripts/push-to-s3-prod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions scripts/push-to-s3-stage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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