People network graph: Shared docs to line thickness, show count on hover (#1669) #1040
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: sphinx docs | |
on: | |
push: # run on push to main and PR | |
branches: | |
- main | |
pull_request: | |
env: | |
DJANGO_ENV: docs | |
jobs: | |
docs: | |
name: sphinx documentation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# Python version to use is stored in the .python-version file, which is the | |
# convention for pyenv: https://github.com/pyenv/pyenv | |
- name: Get Python version | |
run: echo "PYTHON_VERSION=$(cat .python-version)" >> $GITHUB_ENV | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
# We base the python cache on the hash of all requirements files, so that | |
# if any change, the cache is invalidated. | |
- name: Cache pip | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: pip-${{ hashFiles('requirements/*.txt') }} | |
restore-keys: | | |
pip-${{ hashFiles('requirements/*.txt') }} | |
pip- | |
- name: Install dependencies | |
run: pip install -r requirements/docs.txt | |
- name: Setup local_settings.py | |
run: python -c "import uuid; print('SECRET_KEY = \'%s\'' % uuid.uuid4())" >> geniza/settings/local_settings.py | |
- name: Build Sphinx docs | |
run: cd docs && make -b coverage html | |
# for pull requests, exit with error if documentation coverage is incomplete | |
- name: Report on documentation coverage | |
if: ${{ github.event_name == 'pull_request' }} | |
run: if [[ $((`wc -l < docs/_build/coverage/python.txt`)) -eq 3 ]] ; then echo "Documentation coverage complete"; else cat docs/_build/coverage/python.txt && exit 1; fi | |
# when building on push to main, publish the built docs | |
- name: Deploy built docs to github pages | |
if: ${{ github.event_name == 'push' }} | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/_build/html |