summaryrefslogtreecommitdiffstats
path: root/.github/workflows/docs_publish.yml
blob: af146b285ccf362117dfc506d5392f85c9c76697 (plain) (blame)
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
name: build and publish docs

on:
  push:
    tags:
      - "v*"
    branches: # for testing
      - main

jobs:
  build:
    name: build and publish docs
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Set up Python 3.12
        uses: actions/setup-python@v5.3.0
        with:
          python-version: 3.12

      - name: Install sphinx
        run: pip install sphinx

      - name: Build docs
        run: cd docs && make html

      - name: Publish docs to GitHub Pages
        uses: peaceiris/actions-gh-pages@v4
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: docs/build/html