Skip to content

Commit 9438370

Browse files
committed
fix: Add memory limit and env var to deploy builds
This adds the NODE_OPTIONS environment variable to increase the memory limit for the Gatsby build process, preventing out-of-memory errors. It also adds the GATSBY_HF_CDN_URL variable to align the deployment workflows with the preview workflow.
1 parent 52a56be commit 9438370

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/workflows/deploy-production.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ jobs:
146146
- run: npm install
147147

148148
- name: Build
149+
env:
150+
NODE_OPTIONS: "--max-old-space-size=8192"
151+
GATSBY_HF_CDN_URL: ""
149152
run: npm run build
150153

151154
- name: Clean up node_modules # Just to save space

.github/workflows/deploy-staging.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ jobs:
146146
- run: npm install
147147

148148
- name: Build
149+
env:
150+
NODE_OPTIONS: "--max-old-space-size=8192"
151+
GATSBY_HF_CDN_URL: ""
149152
run: npm run build
150153

151154
- name: Clean up node_modules # Just to save space

0 commit comments

Comments
 (0)