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:
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user