ci: test docs for non-master builds
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 22 Jun 2020 09:10:29 +0000 (11:10 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 1 Jul 2020 14:31:38 +0000 (14:31 +0000)
This ensures that we test on CI before merge-requests gets merged.

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5469>

.gitlab-ci.yml

index ca9a22358c3e07e5558afe421b091388476c3a80..16bcc9ab10ac97718c8a43ed76bd83241ad727ba 100644 (file)
@@ -24,13 +24,16 @@ stages:
   - virgl
   - success
 
-pages:
+.docs-base:
   image: alpine
   stage: deploy
   script:
   - apk --no-cache add py3-pip
   - pip3 install sphinx sphinx_rtd_theme
   - sphinx-build -b html docs public
+
+pages:
+  extends: .docs-base
   artifacts:
     paths:
     - public
@@ -41,6 +44,16 @@ pages:
     - docs/**/*
     - .gitlab-ci.yml
 
+test-docs:
+  extends: .docs-base
+  except:
+    refs:
+    - master@mesa/mesa
+  only:
+    changes:
+    - docs/**/*
+    - .gitlab-ci.yml
+
 # When to automatically run the CI
 .ci-run-policy:
   rules: