From 7e25c8df28d238a27c077e499463b9d939e5f6d5 Mon Sep 17 00:00:00 2001 From: Yuan Tang Date: Thu, 15 May 2025 11:41:15 -0400 Subject: [PATCH] fix: ReadTheDocs should display all versions (#2172) # What does this PR do? Currently the website only displays the "latest" version. This is because our config and workflow do not include version information. This PR adds missing version info. --------- Signed-off-by: Yuan Tang --- .github/workflows/update-readthedocs.yml | 7 ++++++- docs/source/conf.py | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-readthedocs.yml b/.github/workflows/update-readthedocs.yml index 21e3b633d..094942368 100644 --- a/.github/workflows/update-readthedocs.yml +++ b/.github/workflows/update-readthedocs.yml @@ -14,6 +14,8 @@ on: - 'docs/**' - 'pyproject.toml' - '.github/workflows/update-readthedocs.yml' + tags: + - '*' pull_request: branches: - main @@ -61,7 +63,10 @@ jobs: response=$(curl -X POST \ -H "Content-Type: application/json" \ - -d "{\"token\": \"$TOKEN\"}" \ + -d "{ + \"token\": \"$TOKEN\", + \"version\": \"$GITHUB_REF_NAME\" + }" \ https://readthedocs.org/api/v2/webhook/llama-stack/289768/) echo "Response: $response" diff --git a/docs/source/conf.py b/docs/source/conf.py index 55c6383b2..501a923dd 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -110,6 +110,8 @@ html_theme_options = { "canonical_url": "https://github.com/meta-llama/llama-stack", "collapse_navigation": False, # "style_nav_header_background": "#c3c9d4", + 'display_version': True, + 'version_selector': True, } default_dark_mode = False