Skip to content

[refactor](next) landing page 1 #37

[refactor](next) landing page 1

[refactor](next) landing page 1 #37

Workflow file for this run

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
---
name: docs-next build check
on:
pull_request:
paths:
- 'docs-next/**'
- 'sidebars-next.ts'
- 'next_versions.json'
- 'i18n/zh-CN/docusaurus-plugin-content-docs-next/**'
- 'docusaurus.config.js'
- '.github/workflows/docs-next-build.yml'
concurrency:
group: ${{ github.ref }} (docs-next build)
cancel-in-progress: true
jobs:
build:
name: Build docs-next
runs-on: ubuntu-latest
steps:
- name: Checkout ${{ github.ref }} ( ${{ github.event.pull_request.head.sha }} )
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 1
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: |
npm install -g yarn
yarn install --frozen-lockfile || yarn install
- name: Build (current only, EN + zh-CN)
env:
DOCS_VERSIONS: current
run: |
export NODE_OPTIONS=--max-old-space-size=8192
yarn docusaurus build --locale en --locale zh-CN
- name: Verify docs-next artifacts
run: |
set -e
test -d build/docs-next/dev
test -d build/zh-CN/docs-next/dev
# docs-next 应不在 sitemap
if grep -q "/docs-next/" build/sitemap.xml; then
echo "::error::sitemap.xml contains /docs-next/ entries (should be excluded during graceful rollout)"
exit 1
fi
# robots.txt 应有 Disallow
if ! grep -q "Disallow: /docs-next/" build/robots.txt; then
echo "::error::robots.txt is missing 'Disallow: /docs-next/'"
exit 1
fi
echo "✅ docs-next artifacts verified"