From 47a664097e634ae45cd4ef4719c887bb9e5eb79c Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Fri, 4 Oct 2024 19:46:07 +0000 Subject: [PATCH] build doc on every pr --- .github/workflows/master-cd.yml | 7 +++---- .github/workflows/test-ci.yml | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/.github/workflows/master-cd.yml b/.github/workflows/master-cd.yml index de884bd..83f79a4 100644 --- a/.github/workflows/master-cd.yml +++ b/.github/workflows/master-cd.yml @@ -64,7 +64,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.12" - name: Install dependencies shell: bash -l {0} run: | @@ -72,14 +72,13 @@ jobs: python -m pip install .[optional,doc] - name: Build API documentation - run: | - python -m sphinx docs docs_build + run: make -C docs html - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: # Upload entire repository - path: 'docs_build' + path: 'build' - name: Deploy to GitHub Pages id: deployment diff --git a/.github/workflows/test-ci.yml b/.github/workflows/test-ci.yml index 71e7022..5c54757 100644 --- a/.github/workflows/test-ci.yml +++ b/.github/workflows/test-ci.yml @@ -28,6 +28,30 @@ jobs: shell: bash run: ruff check src + makedocs: + name: build documentation + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Get history and tags for SCM versioning to work + run: | + git fetch --prune --unshallow + git fetch --depth=1 origin +refs/tags/*:refs/tags/* + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Install dependencies + shell: bash -l {0} + run: | + python -m pip install --upgrade pip + python -m pip install .[optional,doc] + + - name: Build API documentation + run: make -C docs html + codespell: name: Check for spelling errors runs-on: ubuntu-latest