Skip to content

Commit 8009da3

Browse files
committed
Deploying Sphinx docs to the GitHub Pages
1 parent 2d543e3 commit 8009da3

File tree

5 files changed

+44
-71
lines changed

5 files changed

+44
-71
lines changed

.github/workflows/sphinx-build.yaml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Docs
2+
on:
3+
# Manual run
4+
workflow_dispatch:
5+
permissions:
6+
contents: write
7+
jobs:
8+
docs:
9+
runs-on: windows-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-python@v3
13+
- name: Install dependencies
14+
run: |
15+
pip install sphinx sphinx_rtd_theme
16+
pip install --exists-action=w --no-cache-dir -r docs/requirements.txt
17+
pip install --exists-action=w --no-cache-dir -r docs/rtd-requirements.txt
18+
- name: Sphinx build
19+
run: |
20+
sphinx-build docs/source _build
21+
dir
22+
- name: Deploy
23+
uses: peaceiris/actions-gh-pages@v3
24+
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
25+
with:
26+
publish_branch: gh-pages
27+
github_token: ${{ secrets.GITHUB_TOKEN }}
28+
publish_dir: _build/
29+
force_orphan: true

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
*.res
77
*.rc
88
\__pycache__
9-
\__history
9+
\__history
10+
_build/

.readthedocs.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# .readthedocs.yml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Build documentation in the docs/ directory with Sphinx
9+
sphinx:
10+
configuration: docs/source/conf.py
11+
12+
# Optionally build your docs in additional formats such as PDF and ePub
13+
formats: all

docs/Makefile

-33
This file was deleted.

docs/make.bat

-37
This file was deleted.

0 commit comments

Comments
 (0)