[Docs] Rename docs_new/ to docs/ (#32123)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
c949e91f18
commit
b819d2fb5b
@@ -2,8 +2,8 @@ name: Bot Bump Docs Version
|
||||
#
|
||||
# Bumps the "install from source" release-branch version pinned in the docs
|
||||
# (the `git clone -b v<version> ...sglang.git` line in
|
||||
# docs_new/docs/get-started/install.mdx "Method 2: From source" and
|
||||
# docs_new/docs/hardware-platforms/amd_gpu.mdx) whenever a release tag is
|
||||
# docs/docs/get-started/install.mdx "Method 2: From source" and
|
||||
# docs/docs/hardware-platforms/amd_gpu.mdx) whenever a release tag is
|
||||
# pushed, and opens a PR with the change.
|
||||
#
|
||||
# Triggers mirror release-docker.yml: a pushed `v*` tag (the release), or a
|
||||
|
||||
@@ -13,6 +13,22 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# Fail-fast gate: docs_new/ was renamed to docs/ (#32123). git's rename
|
||||
# detection silently re-adds NEW files under docs_new/ on merge without a
|
||||
# conflict, which would resurrect the directory. We check the checked-out
|
||||
# tree directly (git ls-files) rather than diffing against the base ref —
|
||||
# a presence check needs no merge-base and sidesteps the shallow-checkout
|
||||
# / silent-diff failures that plagued the old legacy-docs/ gate.
|
||||
- name: Forbid docs_new/ (renamed to docs/)
|
||||
run: |
|
||||
set -euo pipefail
|
||||
matches="$(git ls-files -- docs_new)"
|
||||
if [ -n "$matches" ]; then
|
||||
echo "::error::docs_new/ was renamed to docs/. Move these files under docs/ instead:"
|
||||
echo "$matches"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
@@ -39,7 +55,7 @@ jobs:
|
||||
with:
|
||||
args: --config .github/linters/lychee.toml README.md
|
||||
|
||||
# docs_new/ (Mintlify) internal-link check. Runs only in CI — contributors
|
||||
# docs/ (Mintlify) internal-link check. Runs only in CI — contributors
|
||||
# are NOT required to install `mint` for local pre-commit. External links
|
||||
# are covered separately by the nightly lychee job (no --check-external here).
|
||||
- name: Set up Node
|
||||
@@ -47,13 +63,13 @@ jobs:
|
||||
with:
|
||||
node-version: "20"
|
||||
|
||||
# Hard gate: docs_new internal links/anchors/redirects must resolve.
|
||||
# Hard gate: docs internal links/anchors/redirects must resolve.
|
||||
# mint is pinned for reproducibility (its heading-slug rules are
|
||||
# version-sensitive); bump deliberately after re-verifying locally.
|
||||
- name: Check docs_new links (Mintlify broken-links)
|
||||
- name: Check docs links (Mintlify broken-links)
|
||||
run: |
|
||||
npm install -g mint@4.2.559
|
||||
cd docs_new
|
||||
cd docs
|
||||
mint broken-links --check-anchors --check-redirects
|
||||
|
||||
- name: Run sgl-kernel clang-format checks
|
||||
|
||||
@@ -112,14 +112,14 @@ jobs:
|
||||
VERSION=$(echo "$BRANCH_NAME" | sed 's/release\///')
|
||||
|
||||
# Update git clone version references in docs
|
||||
sed -i "s/git clone -b v[0-9]\+\.[0-9]\+\.[0-9]\+\.\?post\?[0-9]*/git clone -b $VERSION/" docs_new/docs/get-started/install.mdx
|
||||
sed -i "s/git clone -b v[0-9]\+\.[0-9]\+\.[0-9]\+\.\?post\?[0-9]*/git clone -b $VERSION/" docs_new/docs/hardware-platforms/amd_gpu.mdx
|
||||
sed -i "s/git clone -b v[0-9]\+\.[0-9]\+\.[0-9]\+\.\?post\?[0-9]*/git clone -b $VERSION/" docs/docs/get-started/install.mdx
|
||||
sed -i "s/git clone -b v[0-9]\+\.[0-9]\+\.[0-9]\+\.\?post\?[0-9]*/git clone -b $VERSION/" docs/docs/hardware-platforms/amd_gpu.mdx
|
||||
|
||||
# Check if any changes were made
|
||||
if git diff --quiet; then
|
||||
echo "No version references needed updating"
|
||||
else
|
||||
git add docs_new/docs/get-started/install.mdx docs_new/docs/hardware-platforms/amd_gpu.mdx
|
||||
git add docs/docs/get-started/install.mdx docs/docs/hardware-platforms/amd_gpu.mdx
|
||||
git commit -m "docs: update version references to $VERSION"
|
||||
echo "Updated version references to $VERSION"
|
||||
fi
|
||||
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
- name: Sync blog cards
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: python docs_new/scripts/update_lmsys_sglang_blogs.py
|
||||
run: python docs/scripts/update_lmsys_sglang_blogs.py
|
||||
|
||||
- name: Open or update pull request
|
||||
env:
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
if git diff --quiet -- docs_new/index.mdx; then
|
||||
if git diff --quiet -- docs/index.mdx; then
|
||||
echo "No blog card changes; nothing to do."
|
||||
exit 0
|
||||
fi
|
||||
@@ -45,7 +45,7 @@ jobs:
|
||||
# Recreate the bot branch as "current main + card diff" and overwrite
|
||||
# any previous state, so the PR always shows a clean single-commit diff.
|
||||
git checkout -B "$BRANCH"
|
||||
git add docs_new/index.mdx
|
||||
git add docs/index.mdx
|
||||
git commit -m "docs: sync LMSYS SGLang blog cards"
|
||||
git push --force origin "$BRANCH"
|
||||
|
||||
@@ -56,5 +56,5 @@ jobs:
|
||||
--base main \
|
||||
--head "$BRANCH" \
|
||||
--title "docs: sync LMSYS SGLang blog cards" \
|
||||
--body $'Automated sync of the LMSYS SGLang blog cards in `docs_new/index.mdx`.\n\n🤖 Generated with GitHub Actions'
|
||||
--body $'Automated sync of the LMSYS SGLang blog cards in `docs/index.mdx`.\n\n🤖 Generated with GitHub Actions'
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user