Skip to content

Commit

Permalink
CI: Define $PIP and $SPHINX env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeier committed Jan 8, 2023
1 parent f6e5a96 commit 9dd4719
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/html-macos.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Build HTML on macOS
on: [push, pull_request]
env:
PIP: python -m pip
SPHINX: python -m sphinx -W --keep-going --color
jobs:
html-macos:
runs-on: macos-latest
Expand All @@ -20,10 +23,10 @@ jobs:
python --version
- name: Install Python package
run: |
python -m pip install .
$PIP install .
- name: Install docs dependencies
run: |
python -m pip install -r doc/requirements.txt
$PIP install -r doc/requirements.txt
- name: Build HTML
run: |
python -m sphinx -W --keep-going --color doc/ _build/html/
$SPHINX doc/ _build/html/
12 changes: 8 additions & 4 deletions .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Check links in documentation
on: [push, pull_request]
env:
APT_INSTALL: sudo apt-get install -y --no-install-recommends
PIP: python -m pip
SPHINX: python -m sphinx -W --keep-going --color
jobs:
linkcheck:
runs-on: ubuntu-latest
Expand All @@ -10,7 +14,7 @@ jobs:
fetch-depth: 0
- name: Install pandoc
run: |
sudo apt-get install -y --no-install-recommends pandoc
$APT_INSTALL pandoc
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -20,13 +24,13 @@ jobs:
python --version
- name: Install Python package
run: |
python -m pip install .
$PIP install .
- name: Install docs dependencies
run: |
python -m pip install -r doc/requirements.txt
$PIP install -r doc/requirements.txt
- name: Check links
run: |
python -m sphinx -W --keep-going --color -d _doctrees/ doc/ _build/linkcheck/ -b linkcheck
$SPHINX -d _doctrees/ doc/ _build/linkcheck/ -b linkcheck
- name: Upload results
uses: actions/upload-artifact@v3
if: ${{ success() || failure() }}
Expand Down

0 comments on commit 9dd4719

Please sign in to comment.