diff --git a/website/Makefile b/website/Makefile index 485e1b884c..32791cbc04 100644 --- a/website/Makefile +++ b/website/Makefile @@ -13,7 +13,8 @@ DOCKER_RUN_FLAGS=-it \ --volume "$(PWD)/redirects.js:/app/redirects.js" \ --volume "next-dir:/app/website-preview/.next" \ --volume "$(PWD)/.env:/app/.env" \ - -e "REPO=consul" + -e "REPO=consul" \ + -e "PREVIEW_MODE=developer" # Default: run this if working on the website locally to run in watch mode. .PHONY: website diff --git a/website/scripts/website-build.sh b/website/scripts/website-build.sh index 1c3e5bd776..aabeaa3740 100755 --- a/website/scripts/website-build.sh +++ b/website/scripts/website-build.sh @@ -6,6 +6,8 @@ PREVIEW_DIR=website-preview CLONE_DIR=website-preview # The product for which we are building the deploy preview PRODUCT=consul +# Preview mode, controls the UI rendered (either the product site or developer). Can be `io` or `developer` +PREVIEW_MODE=developer from_cache=false @@ -28,4 +30,4 @@ fi cd "$PREVIEW_DIR" # Run the build:deploy-preview start script -REPO=$PRODUCT DEV_IO=$PRODUCT IS_CONTENT_PREVIEW=true HASHI_ENV=project-preview npm run build:deploy-preview +PREVIEW_MODE=$PREVIEW_MODE REPO=$PRODUCT HASHI_ENV=project-preview npm run build:deploy-preview diff --git a/website/scripts/website-start.sh b/website/scripts/website-start.sh index 0f2a5212b0..7a55355ff2 100755 --- a/website/scripts/website-start.sh +++ b/website/scripts/website-start.sh @@ -4,6 +4,8 @@ REPO_TO_CLONE=dev-portal PREVIEW_DIR=website-preview # The product for which we are building the deploy preview PRODUCT=consul +# Preview mode, controls the UI rendered (either the product site or developer). Can be `io` or `developer` +PREVIEW_MODE=developer should_pull=true @@ -22,4 +24,4 @@ if [ "$should_pull" = true ]; then fi # Run the dev-portal content-repo start script -REPO=$PRODUCT PREVIEW_DIR="$PREVIEW_DIR" npm run start:local-preview +REPO=$PRODUCT PREVIEW_MODE=$PREVIEW_MODE npm run start:local-preview