Commit 0509e26
committed
Set BUILD_MODE=production for the Netlify production context
Caught by Cursor Bugbot on PR #1686.
`astro.config.mjs` gates the Google Tag Manager snippet on
`process.env.BUILD_MODE === 'production'`, but nothing in the Netlify
config or the GitHub Actions docs-build workflow was setting the
variable — so the production deploy of the docs site would silently
ship without GTM, dropping analytics that the previous VuePress site
had always loaded.
Setting `BUILD_MODE = "production"` under
`[context.production.environment]` is the right Netlify-native pattern:
it only applies to deploys from the production branch, leaving PR
deploy previews and branch deploys with `BUILD_MODE` unset so analytics
doesn't fire on non-canonical URLs.1 parent caa0673 commit 0509e26
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
8 | 15 | | |
9 | 16 | | |
10 | 17 | | |
| |||
0 commit comments