[folks] Auto-deploy documentation on master



commit d053b7b1a0204240358d6cd51dc22fcf8fb3ebd9
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Thu Jun 4 13:47:12 2020 +0200

    Auto-deploy documentation on master
    
    After this commit, you can find the latest version of the Folks
    documentation on
    
    * https://gnome.pages.gitlab.gnome.org/folks/devhelp/folks/index.htm
    * https://gnome.pages.gitlab.gnome.org/folks/gtkdoc/folks/
    
    Fixes https://gitlab.gnome.org/GNOME/folks/-/issues/109

 .gitlab-ci.yml | 27 +++++++++++++++++++++++++--
 README.md      |  6 ++++++
 2 files changed, 31 insertions(+), 2 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 359a0e5c..242168e9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,6 +2,7 @@ image: fedora:latest
 
 stages:
   - build
+  - deploy
 
 build-folks:
   stage: build
@@ -13,10 +14,10 @@ build-folks:
       dbus-glib-devel evolution-data-server-devel glib2-devel
       gobject-introspection-devel libgee-devel libxml2-devel meson ninja-build
       python3-dbusmock readline-devel redhat-rpm-config telepathy-glib-devel
-      telepathy-glib-vala tracker-devel vala
+      telepathy-glib-vala tracker-devel vala valadoc gtk-doc
       dbus-daemon # FIXME: dbus-broker breaks the CI, see https://github.com/bus1/dbus-broker/issues/145
   script:
-    - meson _build
+    - meson _build -Ddocs=true
     - ninja -C _build
     - bash +x ./.gitlab-ci/run-tests.sh
   artifacts:
@@ -28,3 +29,25 @@ build-folks:
       - "_build/config.h"
       - "_build/meson-logs"
       - "_build/${CI_JOB_NAME}-report.xml"
+      - "_build/docs"
+
+pages:
+  stage: deploy
+  dependencies:
+    - build-folks
+  script:
+    # Devhelp (Vala API)
+    - mkdir -p public/devhelp
+    - mv _build/docs/devhelp/* public/devhelp
+    # Gtk-doc (C API)
+    - >
+      for f in folks folks-dummy folks-eds folks-telepathy; do
+        mkdir -p public/gtkdoc/$f
+        # We're only interested in the generated HTML here
+        mv _build/docs/gtkdoc/$f/html/* public/gtkdoc/$f
+      done
+  artifacts:
+    paths:
+      - public
+  only:
+    - master
diff --git a/README.md b/README.md
index a0208b6b..ef53aef2 100644
--- a/README.md
+++ b/README.md
@@ -35,6 +35,10 @@ separate translation infrastructure instead. More info can be found at the
 ## More information
 libfolks has its own web page on https://wiki.gnome.org/Projects/Folks.
 
+The latest version of the documentation is alo published online by our CI to
+the GitLab Pages of our repository. You can find the documentation for both the
+[Vala API] as well as the [C API].
+
 To discuss issues with developers and other users, you can post to the [GNOME
 discourse] instance or join [#contacts] on irc.gnome.org.
 
@@ -48,4 +52,6 @@ libfolks is released under the LGPL, version 2.1. See `COPYING` for more info.
 [issue tracker]: https://gitlab.gnome.org/GNOME/folks/issues
 [translation project wiki page]: https://wiki.gnome.org/TranslationProject/
 [GNOME Discourse]: https://discourse.gnome.org
+[Vala API]: https://gnome.pages.gitlab.gnome.org/folks/devhelp/folks/index.htm
+[C API]: https://gnome.pages.gitlab.gnome.org/folks/gtkdoc/folks/
 [#contacts]: irc://irc.gnome.org/contacts


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]