Add documentation job to the CI.

This commit is contained in:
Julian Stirling 2025-07-10 00:06:39 +01:00
parent a84a916719
commit dceb640c77
2 changed files with 33 additions and 0 deletions

View file

@ -168,6 +168,24 @@ build:
paths: paths:
- "src/openflexure_microscope_server/static/" - "src/openflexure_microscope_server/static/"
build-docs:
extends: .python
stage: build
script:
- pydoctor --docformat restructuredtext --theme readthedocs src/openflexure_microscope_server
- echo "JOB_ID=$CI_JOB_ID" > build-docs.env
artifacts:
expire_in: 1 week
name: "${CI_PROJECT_NAME}-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}-docs"
paths:
- apidocs
reports:
dotenv: build-docs.env
environment:
name: review/$CI_COMMIT_REF_SLUG
url: https://$CI_PROJECT_ROOT_NAMESPACE.gitlab.io/-/openflexure-microscope-server/-/jobs/$JOB_ID/artifacts/apidocs/index.html
server_integration_tests: server_integration_tests:
extends: .python extends: .python
stage: integration stage: integration
@ -261,3 +279,17 @@ server_integration_tests:
# only: # only:
# - tags # - tags
# - web # - web
pages:
needs:
- job: build-docs
artifacts: true
stage: deploy
image: "alpine:latest"
script:
- mv apidocs public
artifacts:
paths:
- public
only:
- v3

View file

@ -40,6 +40,7 @@ dev = [
"pytest-mock==3.14", "pytest-mock==3.14",
"matplotlib~=3.10", "matplotlib~=3.10",
"hypothesis", "hypothesis",
"pydoctor"
] ]
pi = [ pi = [
"picamera2~=0.3.27", "picamera2~=0.3.27",