-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix workflows and improve logic #7225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: saurabhraghuvanshii <[email protected]>
Signed-off-by: saurabhraghuvanshii <[email protected]>
|
🚀 Preview for commit 93a5fb7 at: https://69332e57d2d0bb7b2349ed1c--layer5.netlify.app |
Signed-off-by: saurabhraghuvanshii <[email protected]>
|
🚀 Preview for commit 06ccaca at: https://6933332e9520bf82aef56523--layer5.netlify.app |
|
Looks good to me. 👍 |
|
Actually, I fail see why this is needed. The existing logic works as expected in my local builds and it seems to be working fine for the production builds that have been recently published. Where are you seeing that the |
|
@leecalcote The issue was in the npm script, not the make target. Before the fix:
After the fix:
The make target works; the npm script it calls needed to set the environment variable. The fix ensures make build includes all collections in production builds I also experienced that — after about 10 minutes of building, the integration starts building suddenly and uses all of my resources. |
|
|
||
| const isProduction = process.env.NODE_ENV === "production"; | ||
| const isFullSiteBuild = process.env.BUILD_FULL_SITE !== "false"; | ||
| const isFullSiteBuild = process.env.BUILD_FULL_SITE === "true"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about if we have all the env variables or at least this env variable in .env.example so that it's easy to understand for new contributors.
Else we can have a comment on top of the const regarding the default behaviour:
// Default is a lightweight build unless BUILD_FULL_SITE is explicitly true
| const isFullSiteBuild = process.env.BUILD_FULL_SITE === "true"; | |
| // Default is a lightweight build unless BUILD_FULL_SITE is explicitly true | |
| const isFullSiteBuild = process.env.BUILD_FULL_SITE === "true"; |
Description
Problem
The build configuration logic was inverted, causing confusion about when collections are ignored:
Solution
Updated gatsby-config.js to use explicit logic:
process.env.BUILD_FULL_SITE !== "false"toprocess.env.BUILD_FULL_SITE === "true"BUILD_FULL_SITE=false→ lightweight build (ignores heavy collections)Updated package.json to explicitly set BUILD_FULL_SITE=true in the develop script:
This PR fixes #
Notes for Reviewers
Signed commits