Skip to content

Commit af96411

Browse files
authored
fix(docs): build v2 docs (#4257)
* fix(docs): build v2 docs * ci(docs): do not build v3 anymore
1 parent 6189784 commit af96411

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

.github/workflows/docs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
push:
77
branches:
88
- main
9-
- v3.0
9+
- v2
1010

1111
env:
1212
UV_LOCKED: 1
@@ -43,9 +43,9 @@ jobs:
4343
run: uv run python tools/build_docs.py docs-build --version main
4444
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
4545

46-
- name: Build docs (v3.0 branch)
47-
run: uv run python tools/build_docs.py docs-build --version 3-dev
48-
if: github.event_name == 'push' && github.ref == 'refs/heads/v3.0'
46+
- name: Build docs (v2 branch)
47+
run: uv run python tools/build_docs.py docs-build --version 2
48+
if: github.event_name == 'push' && github.ref == 'refs/heads/v2'
4949

5050
- name: Deploy
5151
uses: JamesIves/github-pages-deploy-action@v4

docs/_static/versioning.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const addVersionWarning = (currentVersion, latestVersion) => {
2222
container.id = "version-warning";
2323

2424
const isPreviewVersion = (version) => {
25-
const previewVersions = ['dev', 'develop', 'main', '3-dev'];
25+
const previewVersions = ['dev', 'develop', 'main'];
2626
return previewVersions.includes(version) || parseInt(version) > parseInt(latestVersion);
2727
};
2828

docs/_static/versions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "versions": ["1", "2", "main", "3-dev"], "latest": "2" }
1+
{ "versions": ["1", "2", "main"], "latest": "2" }

docs/conf.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,11 +302,10 @@
302302
"source_user": "litestar-org",
303303
"source_repo": "litestar",
304304
# "source_version": "main", # TODO: We should set this with an envvar depending on which branch we are building?
305-
"current_version": "latest", # TODO: Version dropdown only show caret and now text
305+
"current_version": release, # Use the detected version
306306
"versions": [ # TODO(provinzkraut): this needs to use versions.json but im not 100% on how to do this yet
307307
("latest", "/latest"),
308-
("development", "/main"),
309-
("v3", "/3-dev"),
308+
("v3 (development)", "/main"),
310309
("v2", "/2"),
311310
("v1", "/1"),
312311
],

0 commit comments

Comments
 (0)