perf(ci): build only en locale in docs-site-checks

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.
This commit is contained in:
kshitij
2026-08-08 14:12:34 +05:30
committed by ethernet
parent 973c14b57c
commit 52920747e1
2 changed files with 5 additions and 1 deletions
+4 -1
View File
@@ -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
+1
View File
@@ -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",