From 1d20e74c89e6915d36e45f9465e857469427dc37 Mon Sep 17 00:00:00 2001 From: Adrien Date: Fri, 31 Jul 2026 14:40:38 +0200 Subject: [PATCH] fix(ci): read _versions.yml from the serving bucket The main doc build fetched the version list from the legacy doc-build dataset and synced it to the hf-doc-build/doc bucket, which is what moon-landing actually serves. When a release build had only reached the dataset, the bucket ended up advertising a version whose folder it did not have, and hf.co/docs/ returned a 404 on its default version (tokenizers v0.23.1). Reading the list from the bucket keeps the served version list consistent with the served content. --- .github/workflows/build_main_documentation.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_main_documentation.yml b/.github/workflows/build_main_documentation.yml index abcc672e..e6ad6935 100644 --- a/.github/workflows/build_main_documentation.yml +++ b/.github/workflows/build_main_documentation.yml @@ -150,12 +150,18 @@ jobs: git config --global user.name "Hugging Face Doc Builder" git config --global user.email docs@huggingface.co + # The version list is read from the bucket we serve from, not from the legacy + # dataset: a version advertised in _versions.yml with no matching folder in the + # bucket makes hf.co/docs/ 404 on its default version. - name: Create build directory + env: + HF_TOKEN: ${{ secrets.hf_token }} + PACKAGE_NAME: ${{ env.package_name }} run: | mkdir build_dir - mkdir build_dir/${{ env.package_name }} - cd build_dir/${{ env.package_name }} - wget https://huggingface.co/datasets/hf-doc-build/doc-build/raw/main/${{ env.package_name }}/_versions.yml + mkdir build_dir/$PACKAGE_NAME + cd build_dir/$PACKAGE_NAME + uvx --from huggingface_hub hf cp "hf://buckets/hf-doc-build/doc/$PACKAGE_NAME/_versions.yml" _versions.yml - name: Run pre-command shell: bash