diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 0000000..57710ae --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,42 @@ +name: "Documentation" + +on: + push: + branches: [ main ] + pull_request: ~ + workflow_dispatch: + +# Cancel redundant in-progress jobs. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + + documentation: + name: "Documentation: Python ${{ matrix.python-version }} on ${{ matrix.os }}" + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ["ubuntu-latest"] + python-version: ["3.11"] + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - uses: yezz123/setup-uv@v4 + + - name: Install package and documentation dependencies + run: | + uv pip install --system '.[develop]' --requirement=docs/requirements.txt + + - name: Run link checker + run: | + poe docs-linkcheck + + - name: Build static HTML documentation + run: | + poe docs-html diff --git a/docs/source/conf.py b/docs/source/conf.py index b0e35af..09451a4 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -66,7 +66,7 @@ templates_path = ["_templates"] # You can specify multiple suffix as a list of string: # # source_suffix = ['.rst', '.md'] -source_suffix = ".rst" +source_suffix = {".rst": "restructuredtext"} # The master toctree document. master_doc = "index" @@ -214,7 +214,7 @@ epub_exclude_files = ["search.html"] # -- Options for intersphinx extension --------------------------------------- # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {"https://docs.python.org/": None} +intersphinx_mapping = {"python": ("https://docs.python.org/3", None)} # -- Options for todo extension ----------------------------------------------