netlify.toml (33 lines of code) (raw):
[build]
command = """
set -e
pip install -e .
./scripts/gd build-metadata
# glean.js currently requires a virtual environment
python -mvenv venv --without-pip
wget https://bootstrap.pypa.io/get-pip.py
venv/bin/python get-pip.py
venv/bin/pip install wheel
npm ci
npm run build
if [ "$STORYBOOK" ]; then
npm run build-storybook
mv storybook-static public/storybook
fi
"""
environment = { PYTHON_VERSION = "3.9" }
publish = "public"
[context.production]
[context.production.environment]
CONTEXT = "production"
[[headers]]
# Define which paths this specific [[headers]] block will cover.
for = "/data/*"
[headers.values]
Access-Control-Allow-Origin = "*"
[[redirects]]
from = "/api/v1/*"
to = "/.netlify/functions/:splat"
status = 200
[functions]
directory = ".netlify"