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:
- "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:
extends: .python
stage: integration
@ -261,3 +279,17 @@ server_integration_tests:
# only:
# - tags
# - web
pages:
needs:
- job: build-docs
artifacts: true
stage: deploy
image: "alpine:latest"
script:
- mv apidocs public
artifacts:
paths:
- public
only:
- v3