docs: add Netlify configuration for PR deploy previews (#36908)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Evan Rusackas
2026-01-06 10:52:12 -08:00
committed by GitHub
parent 1949d1bb96
commit aaa174f820
2 changed files with 86 additions and 0 deletions

56
docs/netlify.toml Normal file
View File

@@ -0,0 +1,56 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# Netlify configuration for Superset documentation
# This enables automatic deploy previews for PRs that modify docs
[build]
# Base directory is the docs folder
base = "docs"
# Build command for Docusaurus
command = "yarn install && yarn build"
# Output directory (relative to base)
publish = "build"
# Skip builds when no docs changes (exit 0 = skip, exit 1 = build)
# Checks for changes in docs/ and README.md (which gets pulled into docs)
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF -- . ../README.md"
[build.environment]
# Node version matching docs/.nvmrc
NODE_VERSION = "20"
# Yarn version
YARN_VERSION = "1.22.22"
# Deploy preview settings
[context.deploy-preview]
command = "yarn install && yarn build"
# Branch deploy settings (for feature branches)
[context.branch-deploy]
command = "yarn install && yarn build"
# Redirect /docs to the main docs page
[[redirects]]
from = "/docs"
to = "/docs/intro"
status = 301
# Handle SPA routing for Docusaurus
[[redirects]]
from = "/*"
to = "/index.html"
status = 200

View File

@@ -0,0 +1,30 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# Netlify configuration for Superset Storybook
# Deployed at: superset-storybook.netlify.app
[build]
base = "superset-frontend"
command = "npm install && npm run build-storybook"
publish = "storybook-static"
# Skip builds when no relevant frontend changes
# Rebuilds on: component files, storybook config, dependencies
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF -- src/ packages/ plugins/ .storybook/ package.json yarn.lock"
[build.environment]
NODE_VERSION = "20"