[gnome-shell/zbrown/docgen] ci: Build docs in CI




commit 868890ea20c31d3f8fd2f60e585f204be82f185f
Author: Zander Brown <zbrown gnome org>
Date:   Mon Jun 7 01:10:28 2021 +0100

    ci: Build docs in CI

 .gitlab-ci.yml   | 29 +++++++++++++++++++++++++++++
 docs/meson.build |  3 +--
 2 files changed, 30 insertions(+), 2 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 78f380aa41..8c093c4690 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,6 +9,7 @@ stages:
  - review
  - build
  - test
+ - docs
  - deploy
 
 default:
@@ -227,3 +228,31 @@ nightly:
   extends: '.publish_nightly'
   variables:
     BUNDLES: '$BUNDLE'
+
+reference:
+    stage: docs
+    needs: ["check_commit_log"]
+    before_script:
+        - .gitlab-ci/checkout-mutter.sh
+        - meson mutter mutter/build --prefix=/usr -Dtests=false
+        - ninja -C mutter/build install
+    script:
+        - meson -Dman=false -Dgtk_doc=true build
+        - ninja -C build docs/St docs/Shell
+        - mkdir -p reference/
+        - mv build/docs/St/ reference/
+        - mv build/docs/Shell/ reference/
+    artifacts:
+        paths:
+            - reference
+
+pages:
+    stage: deploy
+    needs: ['reference']
+    script:
+        - mv reference/ public/
+    artifacts:
+        paths:
+             - public
+    only:
+        - master
diff --git a/docs/meson.build b/docs/meson.build
index eed3c32f84..679c1e8532 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -17,7 +17,7 @@ custom_target('shell-doc',
     '--add-include-path=@0@'.format(meson.current_build_dir() / '../src'),
     '--add-include-path=@0@'.format(meson.current_build_dir() / '../src/st'),
     '--add-include-path=@0@'.format(mutter_dep.get_pkgconfig_variable('girdir')),
-    '--add-include-path=@0@'.format(meson.build_root() / 'subprojects/gvc'),
+    '--add-include-path=@0@'.format(meson.current_build_dir() / '../subprojects/gvc'),
     '--config', shell_toml,
     '--output-dir=@OUTPUT@',
     '--no-namespace-dir',
@@ -48,7 +48,6 @@ custom_target('st-doc',
     '--output-dir=@OUTPUT@',
     '--no-namespace-dir',
     '--content-dir=@0@'.format(meson.current_source_dir()),
-    '--fatal-warnings',
     '@INPUT@',
   ],
   depend_files: [ st_toml ],


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