Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions .github/workflows/build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/cron-deploy-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/docs-next-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/manual-deploy-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion versions.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
["4.x", "3.x", "2.1", "current"]
["4.x", "3.x", "2.1"]
Loading