Skip to content

Commit 580fead

Browse files
Migrate documentation workflow to uv
1 parent 46e1250 commit 580fead

2 files changed

Lines changed: 13 additions & 17 deletions

File tree

.github/workflows/documentation.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,23 @@ jobs:
1414
docs:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v3
18-
- uses: actions/setup-python@v3
19-
- name: Install requirements
20-
run: |
21-
pip install -r requirements.txt
22-
- name: Install dependencies
23-
run: |
24-
pip install sphinx sphinx_rtd_theme myst_parser
17+
- uses: actions/checkout@v6
18+
- name: "Install Python"
19+
uses: actions/setup-python@v6
20+
with:
21+
python-version-file: "pyproject.toml"
22+
- name: Install uv
23+
uses: astral-sh/setup-uv@v7
24+
- name: Install the project
25+
run: uv sync --locked --all-extras --dev
2526
- name: Sphinx build
2627
run: |
27-
sphinx-build docs _build
28+
uv run --dev sphinx-build docs docs/build
2829
- name: Deploy to GitHub Pages
2930
uses: peaceiris/actions-gh-pages@v3
3031
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
3132
with:
3233
publish_branch: gh-pages
3334
github_token: ${{ secrets.GITHUB_TOKEN }}
34-
publish_dir: _build/
35+
publish_dir: docs/build/
3536
force_orphan: true

docs/conf.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,17 @@
66
# -- Project information -----------------------------------------------------
77
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
88

9-
import os
10-
import sys
11-
12-
sys.path.insert(0, os.path.abspath("../src/"))
13-
149
project = "Simple JustWatch Python API"
1510
copyright = "2023, Electronic-Mango"
1611
author = "Electronic-Mango"
1712

13+
1814
# -- General configuration ---------------------------------------------------
1915
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
2016

2117
extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode", "sphinx.ext.napoleon"]
2218

23-
templates_path = ["_templates"]
24-
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
19+
exclude_patterns = ["docs/build"]
2520

2621

2722
# -- Options for HTML output -------------------------------------------------

0 commit comments

Comments
 (0)