dfc3ad015a
* Chore (dev portal): update learn nav data links (#15515) * Update docs-nav-data.json * Update docs-nav-data.json * website: fixes internal redirects (#15750) * chore: remove duplicate overview item (#15805) * Use `badge` for `<sup>` tags in nav data JSON files (#15928) * Replacing <sup> tags with badge * Adding type and color to badges * fix broken links in vault docs (#15976) * website: Update old learn links to redirect locations (#16047) * update previews to render developer UI * update redirects * adjust content so it is backwards compat Co-authored-by: HashiBot <62622282+hashibot-web@users.noreply.github.com> Co-authored-by: Kendall Strautman <36613477+kendallstrautman@users.noreply.github.com> Co-authored-by: Ashlee M Boyer <43934258+ashleemboyer@users.noreply.github.com>
34 lines
1.1 KiB
Bash
Executable file
34 lines
1.1 KiB
Bash
Executable file
# Repo which we are cloning and executing npm run build:deploy-preview within
|
|
REPO_TO_CLONE=dev-portal
|
|
# Set the subdirectory name for the base project
|
|
PREVIEW_DIR=website-preview
|
|
# The directory we want to clone the project into
|
|
CLONE_DIR=website-preview
|
|
# The product for which we are building the deploy preview
|
|
PRODUCT=vault
|
|
# Preview mode, controls the UI rendered (either the product site or developer). Can be `io` or `developer`
|
|
PREVIEW_MODE=io
|
|
|
|
from_cache=false
|
|
|
|
if [ -d "$PREVIEW_DIR" ]; then
|
|
echo "$PREVIEW_DIR found"
|
|
CLONE_DIR="$PREVIEW_DIR-tmp"
|
|
from_cache=true
|
|
fi
|
|
|
|
# Clone the base project, if needed
|
|
echo "⏳ Cloning the $REPO_TO_CLONE repo, this might take a while..."
|
|
git clone --depth=1 "https://github.com/hashicorp/$REPO_TO_CLONE.git" "$CLONE_DIR"
|
|
|
|
if [ "$from_cache" = true ]; then
|
|
echo "Setting up $PREVIEW_DIR"
|
|
cp -R "./$CLONE_DIR/." "./$PREVIEW_DIR"
|
|
fi
|
|
|
|
# cd into the preview directory project
|
|
cd "$PREVIEW_DIR"
|
|
|
|
# Run the build:deploy-preview start script
|
|
PREVIEW_MODE=$PREVIEW_MODE REPO=$PRODUCT HASHI_ENV=project-preview npm run build:deploy-preview
|