ci: test docs for non-master builds
[mesa.git] / .gitlab-ci.yml
index efb4972b3fff815f171dcca59cfb5b150ed2e19b..16bcc9ab10ac97718c8a43ed76bd83241ad727ba 100644 (file)
@@ -24,18 +24,35 @@ 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
   only:
-  - master
+    refs:
+    - master@mesa/mesa
+    changes:
+    - 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: