Skip to content

Commit 6ddb811

Browse files
authored
chore: switch-to-uv (#38)
* use uv to build docs * update pre-commit hooks
1 parent 5ae4f95 commit 6ddb811

3 files changed

Lines changed: 9 additions & 13 deletions

File tree

.github/workflows/mkdocs.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v5
11-
- uses: actions/setup-python@v5
12-
with:
13-
python-version: 3.x
11+
- uses: astral-sh/setup-uv@v6
1412
- name: Install dependencies
15-
run: pip install -r docs/requirements.txt
16-
- name: check mkdocs build
13+
run: uv sync --group docs
14+
- name: Check mkdocs build
1715
if: github.ref != 'refs/heads/main'
18-
run: mkdocs build
16+
run: uv run mkdocs build
1917
- name: Upload docs build as artifact
2018
if: github.ref != 'refs/heads/main'
2119
uses: actions/upload-artifact@v4
@@ -27,4 +25,4 @@ jobs:
2725
run: |
2826
git config user.name 'github-actions'
2927
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
30-
mkdocs gh-deploy --force
28+
uv run mkdocs gh-deploy --force

.github/workflows/sphinx.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v5
17-
- uses: actions/setup-python@v5
18-
with:
19-
python-version: 3.x
17+
- uses: astral-sh/setup-uv@v6
2018

2119
- name: Install dependencies
22-
run: pip install -r docs/requirements.txt -e .
20+
run: uv sync --group docs
2321

2422
- name: Build docs
25-
run: sphinx-build docs ${{ inputs.path-to-doc }}
23+
run: uv run sphinx-build docs ${{ inputs.path-to-doc }}
2624

2725
- name: Upload docs build as artifact
2826
uses: actions/upload-artifact@v4

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.5.0
3+
rev: v6.0.0
44
hooks:
55
- id: trailing-whitespace
66
- id: end-of-file-fixer

0 commit comments

Comments
 (0)