mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
docs: add Netlify configuration for PR deploy previews (#36908)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
56
docs/netlify.toml
Normal file
56
docs/netlify.toml
Normal 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
|
||||
30
superset-frontend/netlify.toml
Normal file
30
superset-frontend/netlify.toml
Normal 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"
|
||||
Reference in New Issue
Block a user