ci: move test-docs to container stage
[mesa.git] / .gitlab-ci.yml
index 84d06860866d195358ac26a019fbdfefe4e51279..42a969559ef5deb1c1c6af96b2b47023df286408 100644 (file)
@@ -9,8 +9,7 @@ include:
   - local: '.gitlab-ci/test-source-dep.yml'
 
 stages:
-  - deploy
-  - container
+  - container+docs
   - container-2
   - meson-x86_64
   - scons
@@ -22,20 +21,39 @@ stages:
   - radv
   - lima
   - virgl
+  - deploy
   - 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
+  stage: deploy
   artifacts:
     paths:
     - public
   only:
-  - master@mesa/mesa
+    refs:
+    - master@mesa/mesa
+    changes:
+    - docs/**/*
+    - .gitlab-ci.yml
+
+test-docs:
+  extends: .docs-base
+  stage: container+docs
+  except:
+    refs:
+    - master@mesa/mesa
+  only:
+    changes:
+    - docs/**/*
+    - .gitlab-ci.yml
 
 # When to automatically run the CI
 .ci-run-policy:
@@ -114,7 +132,7 @@ success:
 # repository's registry will be used there as well.
 
 .container:
-  stage: container
+  stage: container+docs
   extends:
     - .ci-run-policy
   rules:
@@ -344,7 +362,7 @@ windows_build_vs2019:
   extends:
     - .container
     - .windows-docker-vs2019
-  stage: container
+  stage: container+docs
   variables:
     GIT_STRATEGY: fetch # we do actually need the full repository though
   timeout: 4h # LLVM takes ages