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




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

    ci: Build docs in CI

 .gitlab-ci.yml   | 32 ++++++++++++++++++++++++++++++++
 docs/meson.build |  3 +--
 2 files changed, 33 insertions(+), 2 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 78f380aa41..7e3748366d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,6 +9,7 @@ stages:
  - review
  - build
  - test
+ - docs
  - deploy
 
 default:
@@ -58,6 +59,9 @@ workflow:
             dnf install -y nodejs &&
             npm install -g eslint &&
 
+            # For docs
+            dnf install -y python3-markdown python3-toml python3-typogrify &&
+
             dnf group install -y 'Development Tools' \
                                  'C Development Tools and Libraries' &&
             dnf install -y meson &&
@@ -227,3 +231,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
+        - 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]