website: add should-build script (#12239)

This commit is contained in:
Bryce Kalow 2021-03-29 10:01:05 -05:00 committed by GitHub
parent d70ff086af
commit ca16fd27b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 463 additions and 234 deletions

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@
"author": "HashiCorp",
"dependencies": {
"@hashicorp/mktg-global-styles": "2.1.0",
"@hashicorp/nextjs-scripts": "16.0.1",
"@hashicorp/nextjs-scripts": "16.3.0",
"@hashicorp/react-button": "4.0.0",
"@hashicorp/react-code-block": "3.0.3",
"@hashicorp/react-docs-page": "^10.3.2",

View File

@ -0,0 +1,13 @@
#!/bin/bash
# This is run during the website build step to determine if we should skip the build or not.
# More information: https://vercel.com/docs/platform/projects#ignored-build-step
if [[ "$VERCEL_GIT_COMMIT_REF" == "stable-website" ]] ; then
# Proceed with the build if the branch is stable-website
echo "✅ - Build can proceed"
exit 1;
else
# Check for differences in the website directory
git diff --quiet HEAD^ HEAD ./
fi