Skip to content

Commit

Permalink
CI: Use $PIP and $SPHINX shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeier committed Jan 13, 2023
1 parent b7bcdcb commit ab4b214
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Build docs and check links
on: [push, pull_request]
env:
PYTHONWARNINGS: error
PIP: python -m pip
SPHINX: python -m sphinx -W --keep-going --color
jobs:
docs:
runs-on: ubuntu-latest
Expand All @@ -20,16 +22,16 @@ 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
env:
# sphinxcontrib-htmlhelp creates deprecation warnings: https://github.com/sphinx-doc/sphinx/issues/11127
PYTHONWARNINGS: error,ignore::PendingDeprecationWarning
run: |
python -m sphinx -W --keep-going --color -d _build/doctrees/ doc/ _build/html/ -b html
$SPHINX -d _build/doctrees/ doc/ _build/html/ -b html
- name: Upload error log
uses: actions/upload-artifact@v3
if: failure()
Expand All @@ -41,7 +43,7 @@ jobs:
# See above
PYTHONWARNINGS: error,ignore::PendingDeprecationWarning
run: |
python -m sphinx -W --keep-going --color -d _build/doctrees/ doc/ _build/linkcheck/ -b linkcheck
$SPHINX -d _build/doctrees/ doc/ _build/linkcheck/ -b linkcheck
- name: Upload linkcheck results
uses: actions/upload-artifact@v3
if: ${{ success() || failure() }}
Expand Down

0 comments on commit ab4b214

Please sign in to comment.