-
Notifications
You must be signed in to change notification settings - Fork 32
45 lines (37 loc) · 1.22 KB
/
sphinx-docs.yml
File metadata and controls
45 lines (37 loc) · 1.22 KB
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
45
name: Build and Deploy Sphinx Docs
on:
push:
branches: [main]
workflow_dispatch: # manual trigger from the GitHub UI
jobs:
sphinx:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Cache pip packages
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('docs-sphinx/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Sphinx and extensions
run: pip install -r docs-sphinx/requirements.txt
- name: Build Sphinx HTML documentation
run: |
cd docs-sphinx
make html
# Deploy only the Sphinx HTML into the sphinx/ subfolder of gh-pages.
# keep_files: true ensures Maven Site and Doxygen output are NOT deleted.
- name: Deploy Sphinx to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs-sphinx/_build/html
destination_dir: sphinx
keep_files: true