diff --git a/.github/workflows/build-on-pr.yml b/.github/workflows/build-on-pr.yml index fa18da76db..a66764ac3e 100644 --- a/.github/workflows/build-on-pr.yml +++ b/.github/workflows/build-on-pr.yml @@ -8,8 +8,6 @@ on: jobs: build: runs-on: ubuntu-latest - env: - NODE_OPTIONS: '--max-old-space-size=8192' steps: - name: Checkout code @@ -25,7 +23,20 @@ jobs: run: npm ci - name: Build Docusaurus - run: npm run build + run: npm run build -- --no-minify + env: + # original defaults https://github.com/facebook/docusaurus/blob/main/packages/docusaurus/src/ssg/ssgEnv.ts + + # GH Runner has only 4 cores https://docs.github.com/en/actions/reference/runners/github-hosted-runners + DOCUSAURUS_SSR_CONCURRENCY: '2' + + # Aligned with the one above + DOCUSAURUS_SSG_WORKER_THREAD_COUNT: '1' + + # Use 128MB per thread until it's recycled + DOCUSAURUS_SSG_WORKER_THREAD_RECYCLER_MAX_MEMORY: '134217728' + + NODE_OPTIONS: '--max-old-space-size=12288' - name: Upload build artifacts uses: actions/upload-artifact@v4