From f252205e035a72ffc396135c724ad0c2a1baa094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Haitz=20Legarreta=20Gorro=C3=B1o?= Date: Thu, 5 Dec 2024 00:44:17 -0500 Subject: [PATCH] ENH: Add documentation build GHA workflow file (#57) --- .github/workflows/doc_build.yaml | 31 +++++++++++++++++++++++++++++++ doc/conf.py | 5 ++--- 2 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/doc_build.yaml diff --git a/.github/workflows/doc_build.yaml b/.github/workflows/doc_build.yaml new file mode 100644 index 0000000..264957e --- /dev/null +++ b/.github/workflows/doc_build.yaml @@ -0,0 +1,31 @@ +name: Build docs + +on: + push: + branches: + - master + tags: + - 'v*' + pull_request: + branches: + - master + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install dependencies + run: | + python -m pip install --upgrade --user pip setuptools coverage + pip install .[doc] + + - name: Build docs + run: | + make -C doc/ SPHINXOPTS="-W -v" BUILDDIR="$HOME/docs" OUTDIR="$HOME/html" html diff --git a/doc/conf.py b/doc/conf.py index 196aa4e..69dfa66 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -223,7 +223,7 @@ #latex_use_parts = False # Additional stuff for the LaTeX preamble. -latex_preamble = """ +latex_preamble = r""" \usepackage{amsmath}\usepackage{amsfonts}\usepackage{bm}\usepackage{morefloats} \usepackage{enumitem} \setlistdepth{10} \renewcommand{\Re}{\ensuremath{\mathbb R}} """ @@ -259,5 +259,4 @@ def get_tokens_unprocessed(self, text): yield index, Keyword.Pseudo, value else: yield index, token, value - wmql_lexer = WMQLLexer() - app.add_lexer('wmql', wmql_lexer) + app.add_lexer('wmql', WMQLLexer)