Repository navigation
44 lines (41 loc) · 1.53 KB
/
Copy pathcli-docs.yml
File metadata and controls
44 lines (41 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Update CLI Docs
on:
pull_request:
branches: [main]
paths:
- "fastapi_code_generator/__main__.py"
- "fastapi_code_generator/cli.py"
- "tests/cli_doc/**"
- "tests/main/**"
- "scripts/build_cli_docs.py"
- "scripts/build_prompt_data.py"
- "docs/cli-reference.md"
- "fastapi_code_generator/prompt_data.py"
- ".github/workflows/cli-docs.yml"
permissions:
contents: read
jobs:
update-cli-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
persist-credentials: false
- name: Install the latest version of uv
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
python-version: "3.14"
- name: Install tox
run: uv tool install --python 3.14 tox --with tox-uv
- name: Setup environment
run: tox run -vv --notest --skip-missing-interpreters false -e cli-docs
env:
UV_PYTHON_PREFERENCE: "only-managed"
- name: Collect CLI doc metadata
run: .tox/cli-docs/bin/pytest --collect-cli-docs -p no:xdist -q
- name: Build CLI docs
run: .tox/cli-docs/bin/python scripts/build_cli_docs.py --check
- name: Build prompt data
run: .tox/cli-docs/bin/python scripts/build_prompt_data.py --output fastapi_code_generator/prompt_data.py --check