diff --git a/netlify.toml b/netlify.toml index 31eb56a489b..50b71cd3537 100644 --- a/netlify.toml +++ b/netlify.toml @@ -5,6 +5,15 @@ [build] publish = "docs/.vitepress/dist" command = "pnpm docs:build:ci" + ignore = ''' + if [ "$CONTEXT" != "deploy-preview" ]; then + # Always build when not a PR preview + exit 1; + else + # Otherwise check if something doc related changed. + git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF -- . \':!src/locale/\' \':!src/locales/\' \':!test/\' \':!package.json\' \':!pnpm-lock.yaml\' \':!.github/\' + fi + ''' # Alias for the main page [[redirects]]