Netlify: skip rebuilds when the demo is unchanged; document auto-deploy

Netlify continuous deployment already auto-deploys on every push to main + builds a deploy
preview per PR. Add a build `ignore` so it only rebuilds when the demo actually changes
(frontend/index.html, scripts/build_demo.py, netlify.toml), and document the behavior.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-12 14:53:45 +02:00
co-authored by Claude Opus 4.8
parent eebffc86f7
commit a9d4499e7f
+12 -4
View File
@@ -1,10 +1,18 @@
# Netlify build for the public live demo (the real frontend/index.html + a seeded mock API,
# no backend). Connect this (private) repo on Netlify — it reads this file, runs the build,
# and serves _site/. Cloudflare Pages: set Build command = "python3 scripts/build_demo.py _site"
# and Output directory = "_site" in the dashboard (same script).
# Netlify continuous deployment for the public live demo (the real frontend/index.html + a
# seeded mock API, no backend).
#
# One-time setup: connect this repo on Netlify (Add new site -> Import an existing project).
# After that Netlify AUTO-DEPLOYS on every push to the production branch (main) and builds a
# deploy preview for every pull request -- no extra config. The build runs the script below and
# serves _site/. (Cloudflare Pages equivalent: Build command "python3 scripts/build_demo.py
# _site", Output directory "_site".)
[build]
command = "python3 scripts/build_demo.py _site"
publish = "_site"
# Skip the build/deploy when nothing the demo depends on changed (saves build minutes):
# `git diff --quiet` exits 0 (-> Netlify cancels the build) when these files are unchanged.
# The first build (no cached ref) errors out of the diff and proceeds normally.
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF -- frontend/index.html scripts/build_demo.py netlify.toml"
[build.environment]
PYTHON_VERSION = "3.12"