| 1 |
name: Build doc |
| 2 |
|
| 3 |
on: |
| 4 |
workflow_dispatch: |
| 5 |
pull_request: |
| 6 |
push: |
| 7 |
branches: |
| 8 |
- 'master' |
| 9 |
|
| 10 |
jobs: |
| 11 |
build: |
| 12 |
|
| 13 |
runs-on: ubuntu-latest |
| 14 |
|
| 15 |
steps: |
| 16 |
- uses: actions/checkout@v4 |
| 17 |
|
| 18 |
|
| 19 |
- name: Set up Python 3.10 |
| 20 |
uses: actions/setup-python@v5 |
| 21 |
with: |
| 22 |
python-version: "3.10" |
| 23 |
|
| 24 |
- name: Get Python running |
| 25 |
run: | |
| 26 |
python -m pip install --user --upgrade --progress-bar off pip |
| 27 |
python -m pip install --user --upgrade --progress-bar off -r requirements_all.txt |
| 28 |
python -m pip install --user --upgrade --progress-bar off -r docs/requirements.txt |
| 29 |
python -m pip install --user --upgrade --progress-bar off ipython "https://api.github.com/repos/sphinx-gallery/sphinx-gallery/zipball/master" memory_profiler |
| 30 |
python -m pip install --user -e . |
| 31 |
|
| 32 |
- name: Check installation |
| 33 |
run: | |
| 34 |
which python |
| 35 |
python -c "import ot" |
| 36 |
|
| 37 |
- name: Generate HTML docs |
| 38 |
uses: rickstaa/sphinx-action@master |
| 39 |
with: |
| 40 |
docs-folder: "docs/" |
| 41 |
- uses: actions/upload-artifact@v4 |
| 42 |
with: |
| 43 |
name: Documentation |
| 44 |
path: docs/build/html/ |