summaryrefslogtreecommitdiff
path: root/.github/workflows/build_doc.yml
blob: 93bd11333a9dfe2f46d0acc05eb15d9f20180ea4 (plain)
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
name: Build doc

on:
  workflow_dispatch:
  pull_request:
  push:
    branches:
      - 'master'  

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    # Standard drop-in approach that should work for most people.

    - name: Set up Python 3.8
      uses: actions/setup-python@v1
      with:
        python-version: 3.8

    - name: Get Python running
      run: |
        python -m pip install --user --upgrade --progress-bar off pip
        python -m pip install --user --upgrade --progress-bar off -r requirements.txt
        python -m pip install --user --upgrade --progress-bar off -r docs/requirements.txt
        python -m pip install --user --upgrade --progress-bar off ipython "https://api.github.com/repos/sphinx-gallery/sphinx-gallery/zipball/master" memory_profiler
        python -m pip install --user -e .
    # Look at what we have and fail early if there is some library conflict
    - name: Check installation
      run: |
        which python
        python -c "import ot"
    # Build docs
    - name: Generate HTML docs
      uses: rickstaa/sphinx-action@master
      with:
        docs-folder: "docs/"
    - uses: actions/upload-artifact@v1
      with:
        name: Documentation
        path: docs/build/html/