Skip to content
Merged
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
50 changes: 50 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: 'docs'

# Builds the documentation with warnings as errors, as Read the Docs does, and keeps the HTML
# as an artifact. A push to main triggers the Read the Docs build of latest, which publishes
# it, see .readthedocs.yaml.

on:
push:
pull_request:
workflow_dispatch:

jobs:

docs:
runs-on: ubuntu-24.04
name: '馃摎 Sphinx'
steps:

- name: '馃О Checkout'
uses: actions/checkout@v4

- name: '馃悕 Setup Python'
uses: actions/setup-python@v6
with:
python-version: '3.13'

- name: '馃摎 Build'
run: |
pip install -r docs/requirements.txt
sphinx-build -W --keep-going -b html docs docs/_build/html

- name: '馃摛 Upload HTML'
uses: actions/upload-artifact@v4
with:
name: docs-html
path: docs/_build/html

publish:
needs: docs
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'VUnit/vunit-python-bridge'
runs-on: ubuntu-24.04
name: '馃殌 Read the Docs'
steps:

- name: '馃殌 Trigger the build of latest'
env:
READTHEDOCS_TOKEN: ${{ secrets.READTHEDOCS_TOKEN }}
run: |
curl --fail-with-body -X POST -H "Authorization: Token $READTHEDOCS_TOKEN" \
https://readthedocs.org/api/v3/projects/vunit-python-bridge/versions/latest/builds/
16 changes: 16 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Read the Docs builds the documentation on every push, with the same Sphinx as the docs
# workflow in .github/workflows/docs.yml.
version: 2

build:
os: ubuntu-24.04
tools:
python: "3.13"

sphinx:
configuration: docs/conf.py
fail_on_warning: true

python:
install:
- requirements: docs/requirements.txt
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Pinned so that a new Sphinx release doesn't break the -W build.
sphinx==9.1.0
Loading