Skip to content

Merge branch 'feat/add-post-indexing-validation' of github.com:uc-cdi… #215

Merge branch 'feat/add-post-indexing-validation' of github.com:uc-cdi…

Merge branch 'feat/add-post-indexing-validation' of github.com:uc-cdi… #215

Workflow file for this run

name: Docs
on:
# DON'T run on pushed commits to master, ONLY on new commits on pull requests
push:
branches-ignore:
- 'master'
paths-ignore:
- 'docs/**'
# Use push trigger since 'paths-ignore' are not respected as expected by 'on.pull_request.paths-ignore', see https://github.com/actions/runner/issues/2324
pull_request:
types: [opened]
jobs:
build_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
# Passing a PAT from the PlanXCybrog bot account here, since otherwise commit pushed by this action won't bale able to trigger other actions, see https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#commits-made-by-this-action-do-not-trigger-new-workflow-runs
token: ${{ secrets.PLANXCYBORG_PAT }}
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- uses: actions/cache@preview
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles(format('{0}{1}', github.workspace, '/poetry.lock')) }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install dependencies
run: |
pip install poetry
poetry config virtualenvs.create false
poetry install -vv --all-extras --no-interaction
poetry show -vv
# install sphinx from PyPI (as of 03/16/21 python3-sphinx is broken)
# sudo apt-get install python3-sphinx
pip install sphinx
pip uninstall -y asyncio
pip list
cd
- name: Build docs
run: |
sphinx-build --version
export PYTHONPATH="${PYTHONPATH}:${{ env.pythonLocation }}/lib/python3.9/site-packages"
cd docs
poetry run make html
cd ..
- uses: stefanzweifel/[email protected]
with:
commit_message: Apply automatic documentation changes
# Optional name of the branch the commit should be pushed to
# Required if Action is used in Workflow listening to the `pull_request` event
branch: ${{ github.head_ref }}