Skip to content

Commit

Permalink
venv for linkcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
sosiristseng committed Aug 5, 2024
1 parent da7b08c commit f77d34c
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,19 @@ jobs:
id: setup-python
with:
python-version: '3.x'
- name: Cache python
- name: Cache python venv
uses: actions/cache@v4
if: ${{ contains(runner.name, 'GitHub Actions') }}
id: cache-py
id: cache-venv
with:
key: ${{ runner.os }}-pip-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}
path: |
${{ env.pythonLocation }}/lib
${{ env.pythonLocation }}/bin
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}
path: .venv
- name: Install Python dependencies
if: ${{ !contains(runner.name, 'GitHub Actions') || steps.cache-py.outputs.cache-hit != 'true' }}
run: pip install -r requirements.txt
run: |
python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
echo "${VIRTUAL_ENV}/bin" >> $GITHUB_PATH
echo "VIRTUAL_ENV=${VIRTUAL_ENV}" >> $GITHUB_ENV
- name: Build website
run: jupyter-book build ${DIR} --builder linkcheck

0 comments on commit f77d34c

Please sign in to comment.