.github: docs: Use sphinx from pip
This gets around the outdated sphinx version shipped with
Ubuntu.
Also add some caching.
@@ -13,11 +13,25 @@ on:
jobs:
check:
runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ python-version: ["3.10"]
steps:
- uses: actions/checkout@v2
- - name: Installing Dependencies
- run: sudo apt install python3-sphinx
+ - name: Create faux requirements.txt file for caching sphinx pip pkg
+ run: echo "sphinx" > sphinx-requirements.txt
+
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python-version }}
+ cache: 'pip'
+ # Use file created on-the-fly to cache sphinx pip pkg
+ cache-dependency-path: 'sphinx-requirements.txt'
+
+ - name: Install sphinx python package from pip
+ run: pip install -r sphinx-requirements.txt
- name: Check docs
# TODO: -W turns warnings into errors
