From c4f64d00cb05ab3be344985557a8325de70d2876 Mon Sep 17 00:00:00 2001 From: Markus Mirz Date: Sat, 4 Jan 2025 18:58:49 +0100 Subject: [PATCH] test docs build separately from pages deploy Signed-off-by: Markus Mirz --- .github/workflows/docs.yaml | 2 -- .github/workflows/test.yaml | 41 ++++++++++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index b0669a69..e4f34e4f 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -1,8 +1,6 @@ name: Documentation on: - pull_request: - push: branches: - master diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e5dd8357..56b63ae6 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,4 +1,4 @@ -name: Pytest +name: Pytest and Sphinx on: push: @@ -33,3 +33,42 @@ jobs: with: name: pytest-results path: report.xml + + test-docs: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: 3.8 + + - name: Install Graphviz + shell: bash + run: | + sudo apt-get -y install graphviz + + - name: Install Python dependencies + run: | + pip install .[doc] + + - name: Build documentation + working-directory: documentation + run: | + sphinx-apidoc \ + --full \ + --doc-project "cimpy" \ + --separate \ + --output-dir "." \ + "../" + + python3 set_inheritance_diagram.py + + make html + + touch _build/html/.nojekyll + + ls -l _build/html