Skip to content

Commit

Permalink
Use setup-python cache
Browse files Browse the repository at this point in the history
  • Loading branch information
benjeffery authored and mergify[bot] committed Oct 4, 2023
1 parent e594a66 commit 53ca1d2
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,37 +28,27 @@ jobs:

- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install apt deps
if: env.APTGET
run: sudo apt-get install -y ${{env.APTGET}}

- uses: actions/cache@v3
id: venv-cache
- uses: actions/setup-python@v4
with:
path: venv
key: docs-venv-v4-${{ hashFiles(env.REQUIREMENTS) }}
python-version: "3.10"
cache: 'pip'

- name: Create venv and install deps (one by one to avoid conflict errors)
if: steps.venv-cache.outputs.cache-hit != 'true'
- name: Create venv and install deps
run: |
python -m venv venv
. venv/bin/activate
pip install --upgrade pip wheel
pip install -r ${{env.REQUIREMENTS}}
- name: Build C module
if: env.MAKE_TARGET
run: |
. venv/bin/activate
make $MAKE_TARGET
- name: Build Docs
run: |
. venv/bin/activate
make -C docs
- name: Trigger docs site rebuild
Expand Down

0 comments on commit 53ca1d2

Please sign in to comment.