From 9939e3922e258117a8676c49c7a05d74992df05f Mon Sep 17 00:00:00 2001 From: Andy Jost Date: Tue, 29 Sep 2026 08:55:12 -0700 Subject: [PATCH] ci(docs): keep release deploys from overwriting the shared version switcher The "Choose Version" dropdown on every cuda.core docs page is driven by one file at the docs root, cuda-core/nv-versions.json, which each page fetches by absolute URL. Every docs deploy copies its own checkout's copy over that root file. Deploys from main keep it current; a release built from a release branch overwrote it with that branch's older list, which hid every version released from main after the branch point until the next main deploy restored it (seen with cuda-core-v1.2.1, #2935/#2944). Delete the switcher files from the release build output next to the existing removal of latest/. The deploy action runs with clean: false, so the root copy on gh-pages is left untouched and main alone owns it. The new version's entry is added on main as part of release prep. Co-Authored-By: Claude Fable 5.1 --- .github/workflows/build-docs.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index bef2a7e84c0..1ea09039d7d 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -237,6 +237,10 @@ jobs: ./build_all_docs.sh # At release time, we don't want to update the latest docs rm -rf build/html/latest + # Nor the shared version-switcher file at the docs root: the theme + # fetches it from one URL for every version, and main deploys own it. + # A release built from a branch would overwrite it with a stale list. + rm -f build/html/nv-versions.json build/html/versions.json fi ls -l build popd @@ -253,6 +257,10 @@ jobs: ./build_docs.sh # At release time, we don't want to update the latest docs rm -rf build/html/latest + # Nor the shared version-switcher file at the docs root: the theme + # fetches it from one URL for every version, and main deploys own it. + # A release built from a branch would overwrite it with a stale list. + rm -f build/html/nv-versions.json build/html/versions.json fi ls -l build popd