From 217fd863e91d50efe6bcda2f47d403fa316f00c1 Mon Sep 17 00:00:00 2001 From: Mishig Date: Thu, 29 Oct 2026 13:52:15 +0100 Subject: [PATCH] Docs: build English only, other languages are machine-translated Co-Authored-By: Claude Opus 5.5 --- .github/workflows/build_documentation.yml | 16 ++-------------- .github/workflows/build_pr_documentation.yml | 4 ++-- .github/workflows/pr_build_doc_with_comment.yml | 6 +++--- .github/workflows/upload_pr_documentation.yml | 2 +- 4 files changed, 8 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build_documentation.yml b/.github/workflows/build_documentation.yml index 272ec3a907fe..73917a15cbfd 100644 --- a/.github/workflows/build_documentation.yml +++ b/.github/workflows/build_documentation.yml @@ -37,26 +37,14 @@ jobs: build: needs: python-version - uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@9fc8a41d7729c424fdb2192f2f85ff63102ec9a3 # main (light installs, no custom container) + uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@145b9d4f6ab65ad3af87c66773b2c43294e52446 # main (light installs, no custom container) with: commit_sha: ${{ github.sha }} package: transformers notebook_folder: transformers_doc - languages: en + path_to_docs: transformers/docs/source/en/ python_version: ${{ needs.python-version.outputs.version }} secrets: token: ${{ secrets.HUGGINGFACE_PUSH }} hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }} - - build_other_lang: - needs: python-version - uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@9fc8a41d7729c424fdb2192f2f85ff63102ec9a3 # main (light installs, no custom container) - with: - commit_sha: ${{ github.sha }} - package: transformers - notebook_folder: transformers_doc - languages: ar de es fr hi it ja ko pt ro tr zh - python_version: ${{ needs.python-version.outputs.version }} - secrets: - token: ${{ secrets.HUGGINGFACE_PUSH }} hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }} \ No newline at end of file diff --git a/.github/workflows/build_pr_documentation.yml b/.github/workflows/build_pr_documentation.yml index 3d0efbe2cd30..15995f2769e9 100644 --- a/.github/workflows/build_pr_documentation.yml +++ b/.github/workflows/build_pr_documentation.yml @@ -52,12 +52,12 @@ jobs: build: needs: check_links if: github.event_name == 'pull_request' - uses: huggingface/doc-builder/.github/workflows/build_pr_documentation.yml@9fc8a41d7729c424fdb2192f2f85ff63102ec9a3 # main + uses: huggingface/doc-builder/.github/workflows/build_pr_documentation.yml@145b9d4f6ab65ad3af87c66773b2c43294e52446 # main with: commit_sha: ${{ github.event.pull_request.head.sha }} pr_number: ${{ github.event.number }} package: transformers - languages: en + path_to_docs: transformers/docs/source/en/ python_version: ${{ needs.check_links.outputs.python_version }} # Satisfy required check in merge queue without actually building docs diff --git a/.github/workflows/pr_build_doc_with_comment.yml b/.github/workflows/pr_build_doc_with_comment.yml index 09253e420de3..05e590878cfb 100644 --- a/.github/workflows/pr_build_doc_with_comment.yml +++ b/.github/workflows/pr_build_doc_with_comment.yml @@ -91,7 +91,7 @@ jobs: -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2022-11-28" \ repos/${{ github.repository }}/issues/${NEEDS_GET_PR_NUMBER_OUTPUTS_PR_NUMBER}/comments \ - -f "body=[Building docs for all languages...](${GITHUB_RUN_URL})" + -f "body=[Building docs...](${GITHUB_RUN_URL})" python-version: name: Read .python-version @@ -122,12 +122,12 @@ jobs: name: Build doc needs: [get-pr-number, get-pr-info, verify_pr_commit, python-version] if: ${{ needs.get-pr-number.outputs.PR_NUMBER != '' && needs.verify_pr_commit.result == 'success' }} - uses: huggingface/doc-builder/.github/workflows/build_pr_documentation.yml@9fc8a41d7729c424fdb2192f2f85ff63102ec9a3 # main + uses: huggingface/doc-builder/.github/workflows/build_pr_documentation.yml@145b9d4f6ab65ad3af87c66773b2c43294e52446 # main with: commit_sha: ${{ needs.get-pr-info.outputs.PR_HEAD_SHA }} pr_number: ${{ needs.get-pr-number.outputs.PR_NUMBER }} package: transformers - languages: ar de en es fr hi it ja ko pt zh + path_to_docs: transformers/docs/source/en/ python_version: ${{ needs.python-version.outputs.version }} update_run_status: diff --git a/.github/workflows/upload_pr_documentation.yml b/.github/workflows/upload_pr_documentation.yml index ee9931b2d025..6a7181dbcf3b 100644 --- a/.github/workflows/upload_pr_documentation.yml +++ b/.github/workflows/upload_pr_documentation.yml @@ -11,7 +11,7 @@ permissions: jobs: build: - uses: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml@9fc8a41d7729c424fdb2192f2f85ff63102ec9a3 # main + uses: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml@145b9d4f6ab65ad3af87c66773b2c43294e52446 # main with: package_name: transformers secrets: