When building for deploy, limit GOMAXPROCS

Copy the approach that we already use for Netlify deploy previews.

It would be OK to drop this once Golang is better able to work with
CFS, or if Hugo includes detection for the cgroup CPU limit.
This commit is contained in:
Tim Bannister 2023-05-24 11:31:07 +01:00
parent 81fd15afe4
commit 3724386042
No known key found for this signature in database
GPG Key ID: 468B7071483F639F
1 changed files with 2 additions and 2 deletions

View File

@ -49,11 +49,11 @@ check-headers-file:
scripts/check-headers-file.sh
production-build: module-check ## Build the production site and ensure that noindex headers aren't added
hugo --cleanDestinationDir --minify --environment production
GOMAXPROCS=1 hugo --cleanDestinationDir --minify --environment production
HUGO_ENV=production $(MAKE) check-headers-file
non-production-build: module-check ## Build the non-production site, which adds noindex headers to prevent indexing
hugo --cleanDestinationDir --enableGitInfo --environment nonprod
GOMAXPROCS=1 hugo --cleanDestinationDir --enableGitInfo --environment nonprod
serve: module-check ## Boot the development server.
hugo server --buildFuture --environment development