From 52920747e17dc5e8ab18a41e4084ed28508b4e6c Mon Sep 17 00:00:00 2001 From: kshitij <82637225+kshitijk4poor@users.noreply.github.com> Date: Sat, 8 Aug 2026 14:12:34 +0530 Subject: [PATCH] perf(ci): build only en locale in docs-site-checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Docusaurus build step (198s) is 79% of the docs-site-checks job wall time and is the CI critical path. The site has two locales (en + zh-Hans, ~700 pages total); building only the default locale in PR checks halves the build time. Follows the same pattern Docusaurus uses internally: a build:fast script that runs `docusaurus build --locale en` for CI/preview builds, while the full bilingual build runs only in deploy-site.yml for production deploys. deploy-site.yml is unchanged — it still runs `npm run build` (all locales) on push-to-main and release. --- .github/workflows/docs-site-checks.yml | 5 ++++- website/package.json | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs-site-checks.yml b/.github/workflows/docs-site-checks.yml index cf775f89e0..1e82698218 100644 --- a/.github/workflows/docs-site-checks.yml +++ b/.github/workflows/docs-site-checks.yml @@ -49,5 +49,8 @@ jobs: working-directory: website - name: Build Docusaurus - run: npm run build + # Build only the default (en) locale in CI — the full bilingual + # build runs in deploy-site.yml on push-to-main / release. + # Same pattern Docusaurus uses internally (build:fast --locale en). + run: npm run build:fast working-directory: website diff --git a/website/package.json b/website/package.json index e3b8477835..1e6d8b1340 100644 --- a/website/package.json +++ b/website/package.json @@ -8,6 +8,7 @@ "start": "docusaurus start", "prebuild": "node scripts/prebuild.mjs", "build": "docusaurus build", + "build:fast": "docusaurus build --locale en", "swizzle": "docusaurus swizzle", "deploy": "docusaurus deploy", "clear": "docusaurus clear",