Commit 2092739
committed
fix(ci): use npm run build directly in CI workflows to always produce full site build
The deploy and preview CI workflows were calling `make clean`, a developer
convenience Makefile target whose recipe has changed several times:
- Previously ran `gatsby clean && make site` which launched `gatsby develop:lite`
(a lite/dev build that EXCLUDES blog, news, events, and resources collections)
or failed with "gatsby: not found" because gatsby is not globally installed in CI.
- Was later patched to `npm run clean && make build`, but this dependency on
a mutable Makefile target is fragile and has already caused multiple production
outages where blog posts (and other collections) were missing from the site.
Fix: call `npm run build` directly in both workflow files.
`npm run build` is defined in package.json as:
cross-env BUILD_FULL_SITE=true gatsby build
This is the canonical, stable production build command and always includes
all collections. It cannot be accidentally changed to a lite build.
Also clarifies the Makefile `clean` target comment to note it is for local
developer use only; CI should not rely on it.1 parent 8997b0d commit 2092739
File tree
3 files changed
+26
-10
lines changed- .github/workflows
3 files changed
+26
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
35 | 43 | | |
36 | 44 | | |
37 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
21 | 29 | | |
22 | 30 | | |
23 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
0 commit comments