Skip to content

Commit e4cbc20

Browse files
authored
ci: add manual docs things with selective input (#4258)
1 parent af96411 commit e4cbc20

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/docs.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ on:
77
branches:
88
- main
99
- v2
10+
workflow_dispatch:
11+
inputs:
12+
version:
13+
description: 'Version to build docs for (1, 2, main, or release)'
14+
required: true
15+
default: 'main'
16+
type: choice
17+
options:
18+
- main
19+
- '2'
20+
- '1'
21+
- release
1022

1123
env:
1224
UV_LOCKED: 1
@@ -47,6 +59,15 @@ jobs:
4759
run: uv run python tools/build_docs.py docs-build --version 2
4860
if: github.event_name == 'push' && github.ref == 'refs/heads/v2'
4961

62+
- name: Build docs (manual trigger)
63+
run: |
64+
if [ "${{ inputs.version }}" == "release" ]; then
65+
uv run python tools/build_docs.py docs-build
66+
else
67+
uv run python tools/build_docs.py docs-build --version ${{ inputs.version }}
68+
fi
69+
if: github.event_name == 'workflow_dispatch'
70+
5071
- name: Deploy
5172
uses: JamesIves/github-pages-deploy-action@v4
5273
with:

0 commit comments

Comments
 (0)