-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (49 loc) · 1.39 KB
/
sphinx.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Sphinx build
on:
# Push/Pull for main branch.
push:
branches: [main]
pull_request:
branches: [main]
# Run workflow manually from actions tab.
workflow_dispatch:
jobs:
build:
# Specify an OS for the runner
runs-on: ubuntu-latest
#Define steps
steps:
# Firstly, checkout repo
- name: Checkout repository
uses: actions/checkout@v4
# Set up Python env
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.11
# Install dependencies
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
pip3 install poetry
poetry install
- name: Build documentation
run: |
mkdir gh-pages
touch gh-pages/.nojekyll
cd docs/source/
poetry run sphinx-build -b html . _build
cp -r _build/* ../gh-pages/
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: html-docs
path: docs/gh-pages
# Deploys to the gh-pages branch if the commit was made to main, the
# gh-pages then takes over serving the html
- name: Deploy documentation
if: ${{ github.event_name == 'push' }}
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages
folder: docs/gh-pages