This is an automated email from the ASF dual-hosted git repository.

moonming pushed a commit to branch fix/canonical-assert
in repository https://gitbox.apache.org/repos/asf/apisix-website.git

commit 5b66e350d53166d62d39b34eecd941c39e55b637
Author: Ming Wen <[email protected]>
AuthorDate: Tue Jul 28 10:44:30 2026 +0800

    fix(ci): drop the canonical assertion for a page Docusaurus no longer builds
    
    The wave-3 deploy failed at "Assert canonical contract". That step checks
    website/build/docs/apisix/plugins/cors/index.html, but wave 3 gave the
    newest release an explicit version path so Docusaurus stops emitting the
    version-less pages — the file it greps is gone, by design.
    
    The failure was safe: the step runs before the publish, so it aborted the
    deploy rather than shipping anything, and asf-site still holds the previous
    build. But master has been unable to deploy since that merge.
    
    Only the version-less half of the assertion is removed. The versioned-page
    half stays where it is, and the cross-site canonical for the version-less
    pages is already asserted after the overlay, for both locales, against the
    files that actually ship.
---
 .github/workflows/deploy.yml | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index d0092e2fde1..524e3d3e2a3 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -136,14 +136,16 @@ jobs:
 
       # Guards the canonical contract of versioned doc pages (see
       # doc/src/theme/LayoutHead/index.tsx): versioned pages must carry exactly
-      # one canonical pointing at the version-less latest URL, and canonicals
-      # embedded in the doc markdown itself must still win.
+      # one canonical pointing at the version-less latest URL.
+      #
+      # The version-less page itself is no longer part of this build — wave 3
+      # moved it to Astro — so the half of this check that covered it now runs
+      # after the overlay, against the page that actually ships.
       - name: Assert canonical contract
         run: |
           f=$(ls website/build/docs/apisix/3.*/plugins/cors/index.html | head 
-1)
           test "$(grep -o 'rel="canonical"' "$f" | wc -l)" -eq 1
           grep -q 'rel="canonical" 
href="https://apisix.apache.org/docs/apisix/plugins/cors/";' "$f"
-          grep -q 'rel="canonical" href="https://docs.api7.ai/hub/cors";' 
website/build/docs/apisix/plugins/cors/index.html
 
       - name: Update sitemap.xml
         run: |
@@ -372,8 +374,9 @@ jobs:
             echo "The Docusaurus SPA still routes the migrated docs URLs 
client-side."
             exit 1
           fi
-          # The cross-site canonical contract asserted earlier in this job runs
-          # against the Docusaurus build; re-assert it on what actually ships.
+          # The version-less pages are built by Astro, so this is the only
+          # place their cross-site canonical can be checked — the Docusaurus
+          # assertion earlier in this job covers the versioned pages.
           for f in website/build/docs/apisix/plugins/cors/index.html \
                    website/build/zh/docs/apisix/plugins/cors/index.html; do
             test "$(grep -o 'rel="canonical"' "$f" | wc -l)" -eq 1

Reply via email to