Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build Docs

on:
push:
branches:
- 'main'
workflow_dispatch:

jobs:
build-docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4.2.2

- name: Set up Python 3.12.6
uses: actions/setup-python@v2
with:
python-version: 3.12.6

- name: Install libsodium
run: sudo apt-get install -y libsodium23

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r docs/requirements.txt

- name: Build singlehtml docs
run: sphinx-build -b singlehtml docs docs/singlehtml

- name: Remove static assets
run: rm -rf docs/singlehtml/_static

- name: Check for changes
id: check
run: |
git diff --quiet docs/singlehtml/index.html || echo "changed=true" >> $GITHUB_OUTPUT

- name: Commit updated docs
if: steps.check.outputs.changed == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add docs/singlehtml/index.html
git commit -m "docs: auto-update singlehtml documentation"
git push
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ instance/

# Sphinx documentation
docs/_build/
docs/singlehtml/_static/

# PyBuilder
target/
Expand Down
Loading