diff --git a/.ci/build-docs.sh b/.ci/build-docs.sh index 66ae1c314..8be78daf8 100755 --- a/.ci/build-docs.sh +++ b/.ci/build-docs.sh @@ -11,6 +11,7 @@ if [ "$(id -u)" = 0 ]; then set -x apk -q add py3-pip make git + apk add dint --allow-untrusted --repository=https://mirror.postmarketos.org/postmarketos/master exec su "${TESTUSER:-build}" -c "sh -e $0" fi diff --git a/.gitignore b/.gitignore index 4ef1c9227..02032c2ca 100644 --- a/.gitignore +++ b/.gitignore @@ -67,6 +67,7 @@ instance/ # Documentation public +docs/deviceinfo-reference.md # PyBuilder target/ diff --git a/docs/Makefile b/docs/Makefile index bfcb1d823..dd203c903 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -14,4 +14,3 @@ run: python3 -m http.server -b 127.0.0.1 8081 -d ../public .PHONY: default venv run - diff --git a/docs/conf.py b/docs/conf.py index 431cb3346..c390d9fd0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,6 +1,8 @@ # Configuration file for the Sphinx documentation builder. import datetime +from pathlib import Path +import subprocess project = "pmaports" copyright = str(datetime.date.today().year) + ", postmarketOS contributors" @@ -23,3 +25,12 @@ html_theme_options = { # Set the explicit title of the HTML output html_title = "postmarketOS Packaging" + + +def run_dint_doc(app): + with Path(__file__).parent.joinpath("deviceinfo-reference.md").open("w") as f: + subprocess.call(["dint", "doc"], stdout=f) + + +def setup(app): + app.connect("builder-inited", run_dint_doc) diff --git a/docs/index.md b/docs/index.md index 8a682bcd2..d6f68d364 100644 --- a/docs/index.md +++ b/docs/index.md @@ -15,6 +15,7 @@ in pmaports and the processes around device categorization. approval-rules device-categorization + deviceinfo-reference ci-tags kernel-versions ```