-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.22 KB
/
docs.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
# Copyright DB InfraGO AG and contributors
# SPDX-License-Identifier: CC0-1.0
name: Docs
on:
workflow_dispatch:
push:
branches: [master]
jobs:
sphinx:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
cache: pip
cache-dependency-path: pyproject.toml
python-version: "3.12"
- name: Upgrade pip
run: python -m pip install -U pip
- name: Install dependencies
run: |
sudo apt-get install -y pandoc
python -m pip install '.[docs]'
- name: Auto-generate APIDOC sources
run: make -C docs apidoc
- name: Create docs
run: make -C docs html
- name: Deploy
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
force_orphan: true
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html