diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index 0109332c1401d..96314c864a54e 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -86,18 +86,22 @@ jobs: # Check each changed file and map to doc version while IFS= read -r file; do case "$file" in - # English current (dev) docs + # English legacy current dir — no longer compiled + # (dev moved to docs-next plugin). PR #3610 forbids + # modifying these files; if they change anyway, fall + # through to a minimal default-version smoke build. docs/*) - VERSIONS="current,$VERSIONS" + VERSIONS="4.x,$VERSIONS" ;; # English versioned docs versioned_docs/version-*/*) ver=$(echo "$file" | sed -n 's|versioned_docs/version-\([^/]*\)/.*|\1|p') VERSIONS="${ver},$VERSIONS" ;; - # Chinese current docs + # Chinese legacy current dir — no longer compiled + # (see docs/* note above). i18n/zh-CN/docusaurus-plugin-content-docs/current/*) - VERSIONS="current,$VERSIONS" + VERSIONS="4.x,$VERSIONS" LOCALES="en,zh-CN" ;; # Chinese versioned docs @@ -110,9 +114,11 @@ jobs: i18n/zh-CN/docusaurus-plugin-content-docs-community/*|i18n/zh-CN/code.json) LOCALES="en,zh-CN" ;; - # Sidebar for current (dev) version + # Sidebar for legacy current — no longer compiled + # (legacy plugin uses includeCurrentVersion: false). + # Fall through to minimal default-version build. sidebars.ts) - VERSIONS="current,$VERSIONS" + VERSIONS="4.x,$VERSIONS" ;; # Versioned sidebars: extract version from filename # e.g. versioned_sidebars/version-4.x-sidebars.json → 4.x @@ -158,9 +164,10 @@ jobs: # No versioned doc changes (e.g., only blog, community, or scripts). # Blog and community plugins are always compiled by Docusaurus # regardless of DOCS_VERSIONS, so we just set the minimal docs - # scope to keep the build fast. - DOCS_VERSIONS="current" - echo "No doc version changes detected, doing minimal build with 'current' only." + # scope to keep the build fast. Use the default version since + # the legacy plugin no longer ships an unversioned 'current'. + DOCS_VERSIONS="4.x" + echo "No doc version changes detected, doing minimal build with '4.x' only." echo "(Blog and community plugins are always built regardless.)" fi diff --git a/.github/workflows/cron-deploy-website.yml b/.github/workflows/cron-deploy-website.yml index 63b4098f1b303..6fe7c3390db15 100644 --- a/.github/workflows/cron-deploy-website.yml +++ b/.github/workflows/cron-deploy-website.yml @@ -39,14 +39,7 @@ jobs: export NODE_OPTIONS=--max-old-space-size=8192 yarn node ./scripts/update_github_info.js - # Build each locale separately into its own out-dir to halve per-process peak memory and avoid OOM on the GitHub-hosted runner. - PWA_SERVICE_WORKER_URL=https://doris.apache.org/sw.js yarn docusaurus build --locale en --out-dir build-en - PWA_SERVICE_WORKER_URL=https://doris.apache.org/sw.js yarn docusaurus build --locale zh-CN --out-dir build-zh - rm -rf ./build && mkdir ./build - cp -a ./build-en/. ./build/ - # docusaurus build --locale zh-CN --out-dir build-zh writes the locale's full output directly under build-zh/ (no zh-CN subdir); the emitted HTML already contains /zh-CN/ URL prefixes, so we publish build-zh/ verbatim under build/zh-CN/. - mkdir -p ./build/zh-CN - cp -a ./build-zh/. ./build/zh-CN/ + PWA_SERVICE_WORKER_URL=https://doris.apache.org/sw.js yarn docusaurus build --locale en --locale zh-CN if [ ! -d "./ja-build" ]; then echo "ja-build directory not found, aborting to avoid publishing incorrect ja content." exit 1 diff --git a/.github/workflows/docs-next-build.yml b/.github/workflows/docs-next-build.yml index cadf880d3eb00..87d35ec5eadfe 100644 --- a/.github/workflows/docs-next-build.yml +++ b/.github/workflows/docs-next-build.yml @@ -65,10 +65,14 @@ jobs: npm install -g yarn yarn install --frozen-lockfile || yarn install - - name: Build (current only, EN + zh-CN) + - name: Build (docs-next + minimal legacy 4.x, EN + zh-CN) if: steps.changes.outputs.relevant == 'true' env: - DOCS_VERSIONS: current + # Keep the legacy docs plugin enabled (needed by docsVersionDropdown + # navbar items on /archive-docs, /community/..., etc.) but limit it + # to a single version to keep the smoke build fast. 'current' is no + # longer a valid legacy version — that build moved to docs-next. + DOCS_VERSIONS: '4.x' run: | export NODE_OPTIONS=--max-old-space-size=8192 yarn docusaurus build --locale en --locale zh-CN diff --git a/.github/workflows/manual-deploy-website.yml b/.github/workflows/manual-deploy-website.yml index cefd4c3a70900..b8a8b985b009e 100644 --- a/.github/workflows/manual-deploy-website.yml +++ b/.github/workflows/manual-deploy-website.yml @@ -42,14 +42,7 @@ jobs: yarn cache clean export NODE_OPTIONS=--max-old-space-size=8192 yarn - # Build each locale separately into its own out-dir to halve per-process peak memory and avoid OOM on the GitHub-hosted runner. - PWA_SERVICE_WORKER_URL=https://doris.apache.org/sw.js yarn docusaurus build --locale en --out-dir build-en - PWA_SERVICE_WORKER_URL=https://doris.apache.org/sw.js yarn docusaurus build --locale zh-CN --out-dir build-zh - rm -rf ./build && mkdir ./build - cp -a ./build-en/. ./build/ - # docusaurus build --locale zh-CN --out-dir build-zh writes the locale's full output directly under build-zh/ (no zh-CN subdir); the emitted HTML already contains /zh-CN/ URL prefixes, so we publish build-zh/ verbatim under build/zh-CN/. - mkdir -p ./build/zh-CN - cp -a ./build-zh/. ./build/zh-CN/ + PWA_SERVICE_WORKER_URL=https://doris.apache.org/sw.js yarn docusaurus build --locale en --locale zh-CN if [ ! -d "./ja-build" ]; then echo "ja-build directory not found, aborting to avoid publishing incorrect ja content." exit 1 diff --git a/docusaurus.config.js b/docusaurus.config.js index 50cfed6f2b69b..93dc0a05c8c69 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -262,6 +262,9 @@ const config = { /** @type {import('@docusaurus/preset-classic').Options} */ ({ docs: SKIP_DOCS ? false : { + // Dev (unversioned) build moved to the docs-next plugin; the legacy + // docs/ tree only ships the snapshotted versions in versions.json. + includeCurrentVersion: false, ...(ONLY_VERSIONS && { onlyIncludeVersions: ONLY_VERSIONS }), // When filtering versions, lastVersion must be in the // included list. Fall back to the first included version. diff --git a/versions.json b/versions.json index 7f902aa2102c1..a9a6278010411 100644 --- a/versions.json +++ b/versions.json @@ -1 +1 @@ -["4.x", "3.x", "2.1", "current"] +["4.x", "3.x", "2.1"]