Manual/pytket 1.20.1 #610
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: check manual | |
on: | |
pull_request: | |
branches: | |
- main | |
schedule: | |
# 03:00 every Saturday morning | |
- cron: '0 3 * * 6' | |
jobs: | |
changes: | |
runs-on: ubuntu-22.04 | |
outputs: | |
manual: ${{ steps.filter.outputs.manual }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
base: ${{ github.ref }} | |
filters: | | |
manual: | |
- 'manual/**' | |
- 'manual_requirements.txt' | |
check: | |
name: check manual | |
needs: changes | |
if: github.event_name == 'schedule' || needs.changes.outputs.manual == 'true' | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/* | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: install python requirements for manual | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install wheel | |
python -m pip install -r manual_requirements.txt | |
python -m pip install -c manual_constraints.txt sphinx sphinx-book-theme jupyter-sphinx | |
python -m pip install sphinx-copybutton | |
python -m pip install ipyparallel | |
- name: install graphviz | |
run: | | |
sudo apt-get update | |
sudo apt-get install graphviz | |
- name: build manual | |
run: | | |
cd manual/ | |
sed "s/REQUIREMENTS/$(sed -e 's/[\&/]/\\&/g' -e 's/$/\\n/' ../manual_requirements.txt | tr -d '\n')/" index-rst-template > index.rst | |
sphinx-build -W -b html . build |