aboutsummaryrefslogtreecommitdiff
blob: 53eee2c7f56dc6669312c451db2acea5694db7ea (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
name: doc

on:
  push:
    branches: [master]

jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout code
      uses: actions/checkout@v3

    - name: Set up Python 3.10
      uses: actions/setup-python@v4
      with:
        python-version: '3.10'
        cache: 'pip'
        cache-dependency-path: pyproject.toml

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install .[doc]

    - name: Build sphinx documentation
      run: |
        make html
        # notify github this isn't a jekyll site
        touch build/sphinx/html/.nojekyll

    - name: Deploy docs to gh-pages
      uses: JamesIves/github-pages-deploy-action@v4
      with:
        token: ${{ secrets.GITHUB_TOKEN }}
        branch: gh-pages
        folder: build/sphinx/html
        single-commit: true