diff --git a/.github/workflows/Tests.yaml b/.github/workflows/Tests.yaml index efed325..29a6a05 100644 --- a/.github/workflows/Tests.yaml +++ b/.github/workflows/Tests.yaml @@ -118,3 +118,33 @@ jobs: - name: Ensure we can build JS package run: yarn pack working-directory: javascript + + build-docs: # validate that doc can be built + runs-on: ubuntu-24.04 + needs: generate-rules + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version-file: pyproject.toml + architecture: x64 + + - name: Install dependencies (and project) + run: | + pip install -U pip hatch + pip install -e .[docs] + + - name: Build mkdoc documentation + run: hatch run docs:build + + - name: Save doc artifact + uses: actions/upload-artifact@v4 + with: + path: | + site/ + name: doc + retention-days: 1 diff --git a/README.md b/README.md index 5b0a1b2..c58f36a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # zimscraperlib -[![Build Status](https://github.com/openzim/python-scraperlib/workflows/CI/badge.svg?query=branch%3Amain)](https://github.com/openzim/python-scraperlib/actions?query=branch%3Amain) +[![QA Status](https://github.com/openzim/python-scraperlib/workflows/QA/badge.svg?query=branch%3Amain)](https://github.com/openzim/python-scraperlib/actions/workflows/QA.yaml) +[![Tests Status](https://github.com/openzim/python-scraperlib/workflows/Tests/badge.svg?query=branch%3Amain)](https://github.com/openzim/python-scraperlib/actions/workflows/Tests.yaml) [![CodeFactor](https://www.codefactor.io/repository/github/openzim/python-scraperlib/badge)](https://www.codefactor.io/repository/github/openzim/python-scraperlib) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![PyPI version shields.io](https://img.shields.io/pypi/v/zimscraperlib.svg)](https://pypi.org/project/zimscraperlib/) diff --git a/mkdocs.yml b/mkdocs.yml index 6e3ca61..78caf7d 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -71,7 +71,7 @@ plugins: handlers: python: # Set up cross-references to Python types - import: + inventories: - https://docs.python.org/3/objects.inv paths: [src] options: diff --git a/pyproject.toml b/pyproject.toml index 933b816..33a8c2d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -78,6 +78,7 @@ docs = [ "pymdown-extensions==10.17.1", "mkdocs-gen-files==0.5.0", "mkdocs-literate-nav==0.6.2", + "pygments==2.19.2", # See https://github.com/pygments/pygments/issues/3076 ] dev = [ "ipython==9.7.0",