-
Notifications
You must be signed in to change notification settings - Fork 88
62 lines (58 loc) · 1.78 KB
/
check-manual.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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@v3
id: filter
with:
base: ${{ github.ref }}
filters: |
manual:
- 'manual/**'
- 'manual_requirements.txt'
- 'manual_constraints.txt'
- '.github/**'
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.11
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: install python requirements for manual
run: |
python -m pip install --upgrade pip
python -m pip install wheel
python -m pip install -c manual_constraints.txt sphinx sphinx-book-theme jupyter-sphinx quimb
python -m pip install -r manual_requirements.txt
python -m pip install kahypar
python -m pip install sphinx-copybutton
python -m pip install ipyparallel
python -m pip install qiskit-algorithms
- 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 -b html . build -W