Skip to content

Commit

Permalink
fix: manage docs deps with poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
eiri committed Mar 28, 2024
1 parent febbdc2 commit cfbd64b
Show file tree
Hide file tree
Showing 4 changed files with 713 additions and 9 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,19 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install mkdocs
run: python -m pip install mkdocs "mkdocstrings[python]" mkdocs-material
- name: Setup caching
- name: Install poetry
run: python -m pip install poetry
- name: Configure poetry
run: poetry config virtualenvs.in-project true
- name: Cache the virtualenv
uses: actions/cache@v4
with:
key: ${{ github.sha }}
path: .cache
path: ./.venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --with docs --without dev
- name: Build site
run: mkdocs build
run: poetry run mkdocs build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
Expand All @@ -25,7 +26,7 @@ jobs:
path: ./.venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install
run: poetry install --without docs
- name: Lint
run: poetry run ruff check --show-files --exit-non-zero-on-fix
- name: Run tests
Expand Down
Loading

0 comments on commit cfbd64b

Please sign in to comment.