Skip to content

Commit

Permalink
ci(readthedocs): add poetry installation and dependency management
Browse files Browse the repository at this point in the history
Add post_create_environment and post_install jobs to install poetry
and manage dependencies with the 'docs' group. This ensures a more
consistent and reproducible build environment for documentation.
  • Loading branch information
NodeJSmith committed Jun 16, 2024
1 parent c5c6436 commit 788be52
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ build:
tools:
python: "3.10"

jobs:
post_create_environment:
# Install poetry
# https://python-poetry.org/docs/#installing-manually
- pip install poetry
post_install:
# Install dependencies with 'docs' dependency group
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
# VIRTUAL_ENV needs to be set manually for now.
# See https://github.com/readthedocs/readthedocs.org/pull/11152/
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with docs

mkdocs:
configuration: mkdocs.yml

# Optionally declare the Python requirements required to build your docs

python:
install:
- method: pip
path: .
extra_requirements:
- docs

0 comments on commit 788be52

Please sign in to comment.