ci: Add a stage for building the API reference
We can generate the GLib API references and publish them, so they are
always up to date.
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e2afb12..b3b29ac 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,6 +3,7 @@
stages:
- build
- coverage
+ - docs
- deploy
cache:
@@ -189,12 +190,29 @@
- bash -x ./.gitlab-ci/coverage-docker.sh
coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
+api-reference:
+ stage: docs
+ except:
+ - tags
+ script:
+ - meson -Dgtk_doc=true _build .
+ - ninja -C _build
+ - ninja -C _build glib-doc gobject-doc gio-doc
+ - mv _build/docs/reference/glib/html _docs/glib
+ - mv _build/docs/reference/gobject/html _docs/gobject
+ - mv _build/docs/reference/gio/html _docs/gio
+ artifacts:
+ name: "glib-apidocs-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
+ paths:
+ - _docs
+
pages:
stage: deploy
only:
- master
script:
- - mv _coverage/ public/
+ - mv _coverage/ public/coverage/
+ - mv _docs/ public/docs/
artifacts:
paths:
- public