Skip to content

Commit f9801eb

Browse files
authored
fix(netlify): trigger master deploys on actual source changes (#3195)
1 parent a5bcc6b commit f9801eb

3 files changed

Lines changed: 31 additions & 16 deletions

File tree

apps/leaderboard/netlify.toml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22
publish = "dist/apps/leaderboard"
33
command = "yarn nx build leaderboard"
44

5-
# If the branch is not master, continue the build process
6-
# If the branch is master, check if the project's CHANGELOG.md file has changed
7-
# If the CHANGELOG.md file has changed, continue the build process,
8-
# Otherwise, stop the build process
9-
ignore = "[ \"$BRANCH\" != \"master\" ] && exit 1 || git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF -- apps/leaderboard/CHANGELOG.md && exit 0 || exit 1"
5+
# Trigger a master deploy whenever the app's own source, the shared
6+
# libs it consumes, or the workspace dep manifest changes. The previous
7+
# version gated on apps/leaderboard/CHANGELOG.md only, which silently
8+
# cancelled every push that wasn't a release-PR — leaderboard had
9+
# never deployed before we caught it. CHANGELOG.md is now implicitly
10+
# covered (it's inside apps/leaderboard/), and any source/config/
11+
# lockfile change also re-triggers.
12+
#
13+
# Non-master branches always build (gives PR-preview deploys).
14+
ignore = "[ \"$BRANCH\" != \"master\" ] && exit 1 || git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF -- apps/leaderboard/ libs/ package.json yarn.lock tsconfig.base.json nx.json && exit 0 || exit 1"

apps/tangle-cloud/netlify.toml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22
publish = "dist/apps/tangle-cloud"
33
command = "yarn nx build tangle-cloud"
44

5+
# Trigger a master deploy whenever the app's own source, the shared
6+
# libs it consumes, or the workspace dep manifest changes. The previous
7+
# version gated on apps/tangle-cloud/CHANGELOG.md only, which silently
8+
# cancelled every push that wasn't a release-PR — a year of overhaul
9+
# work piled up un-deployed before we caught it. CHANGELOG.md is now
10+
# implicitly covered (it's inside apps/tangle-cloud/), and any source/
11+
# config/lockfile change also re-triggers.
12+
#
13+
# Non-master branches always build (gives PR-preview deploys).
14+
ignore = "[ \"$BRANCH\" != \"master\" ] && exit 1 || git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF -- apps/tangle-cloud/ libs/ package.json yarn.lock tsconfig.base.json nx.json && exit 0 || exit 1"
15+
516
# ─── Per-context environment ───────────────────────────────────────────
617
#
718
# Vite reads VITE_* vars at build time and inlines them into the bundle,
@@ -28,12 +39,6 @@
2839
# Same default for any non-master branch deploy (e.g. staging).
2940
VITE_BLUEPRINT_IFRAME_ENABLED = "true"
3041

31-
# If the branch is not master, continue the build process
32-
# If the branch is master, check if the project's CHANGELOG.md file has changed
33-
# If the CHANGELOG.md file has changed, continue the build process,
34-
# Otherwise, stop the build process
35-
ignore = "[ \"$BRANCH\" != \"master\" ] && exit 1 || git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF -- apps/tangle-cloud/CHANGELOG.md && exit 0 || exit 1"
36-
3742
# ─── Security headers ───────────────────────────────────────────────────
3843
#
3944
# Scope is intentionally narrow: we set ONLY the headers needed to harden

apps/tangle-dapp/netlify.toml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22
publish = "dist/apps/tangle-dapp"
33
command = "yarn nx build tangle-dapp"
44

5-
# If the branch is not master, continue the build process
6-
# If the branch is master, check if the project's CHANGELOG.md file has changed
7-
# If the CHANGELOG.md file has changed, continue the build process,
8-
# Otherwise, stop the build process
9-
ignore = "[ \"$BRANCH\" != \"master\" ] && exit 1 || git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF -- apps/tangle-dapp/CHANGELOG.md && exit 0 || exit 1"
5+
# Trigger a master deploy whenever the app's own source, the shared
6+
# libs it consumes, or the workspace dep manifest changes. The previous
7+
# version gated on apps/tangle-dapp/CHANGELOG.md only, which silently
8+
# cancelled every push that wasn't a release-PR — production was stuck
9+
# on the August 2025 release until we caught it. CHANGELOG.md is now
10+
# implicitly covered (it's inside apps/tangle-dapp/), and any source/
11+
# config/lockfile change also re-triggers.
12+
#
13+
# Non-master branches always build (gives PR-preview deploys).
14+
ignore = "[ \"$BRANCH\" != \"master\" ] && exit 1 || git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF -- apps/tangle-dapp/ libs/ package.json yarn.lock tsconfig.base.json nx.json && exit 0 || exit 1"
1015

1116
# ─── Cache headers ──────────────────────────────────────────────────────
1217
#

0 commit comments

Comments
 (0)