summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorSam Thursfield <sam@afuera.me.uk>2020-04-04 22:17:23 +0200
committerSam Thursfield <sam@afuera.me.uk>2020-04-05 00:37:57 +0200
commit149f5e0bfe43066560ccd3c4e3644201107ca76d (patch)
tree49fdf07ea5d349a200104b63da2ccaa646d71687 /.gitlab-ci.yml
parentef0027c2dbb5da17cba19ea3627ba087344e5d2b (diff)
downloadtracker-149f5e0bfe43066560ccd3c4e3644201107ca76d.tar.gz
Add an initial website for Tracker, built using mkdocs
Run `mkdocs` in the toplevel directory to generate the HTML. The last time Tracker had a website was 2011 (http://web.archive.org/web/20110307070049/http://projects.gnome.org/tracker) so this is very exciting. The website is published here: https://gnome.pages.gitlab.gnome.org/tracker/ The latest API reference documentation is built and included in the Tracker website, available under the /docs/api-preview/ prefix. This allows us to browse and reference the documentation during Tracker 3.0 development, as well as providing a sort of work around for https://gitlab.gnome.org/GNOME/tracker/-/issues/100. A warning is added to each documentation page advising that it is a preview built from Git.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml26
1 files changed, 26 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 43c773bb7..aeb209be6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -13,6 +13,7 @@ variables:
stages:
- test
- analysis
+ - website
.test_template: &test
stage: test
@@ -78,3 +79,28 @@ coverity:
--form description="gitlab CI build"'
only:
- master
+
+pages:
+ stage: website
+ image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/fedora:latest
+ dependencies: []
+ before_script:
+ - dnf install -y python3-pip
+ - pip3 install mkdocs mkdocs-cinder
+ script:
+ # Build tracker and install.
+ - su tracker -c 'mkdir build; cd build; meson .. --prefix=/tmp/tracker; ninja install'
+ # Build tracker-miners and install any documentation from there as well.
+ - su tracker -c '.gitlab-ci/checkout-tracker-miners.sh'
+ - su tracker -c 'cd extra/tracker-miners; mkdir build; cd build; env PKG_CONFIG_PATH=/tmp/tracker/lib64/pkgconfig meson .. --prefix=/tmp/tracker; ninja install'
+ # Generate the website using mkdocs.
+ - |
+ tracker_commit=$CI_COMMIT_SHA1
+ tracker_miners_commit=$(git -C ./extra/tracker-miners rev-parse HEAD)
+ ./docs/website/build.py --api-docs=/tmp/tracker/share/gtk-doc/html --tracker-commit=${tracker_commit}
+ artifacts:
+ paths:
+ - public
+ only:
+ - master
+ - sam/website