]> kaliko git repositories - python-musicpd.git/commitdiff
ci: Add conditional builds
authorKaliko Jack <kaliko@azylum.org>
Sat, 11 Nov 2023 14:29:37 +0000 (15:29 +0100)
committerKaliko Jack <kaliko@azylum.org>
Sat, 11 Nov 2023 14:36:56 +0000 (15:36 +0100)
.gitlab-ci.yml

index 35c8fe0d149136ff672372429cb3c7770bec024b..8b08de7ec5a496a1211228ec7b7f25530ed1c91c 100644 (file)
@@ -26,8 +26,8 @@ stages:
     - py.test -q --cov=musicpd test.py
   rules:
     - changes:
-      - musicpd.py
-      - test.py
+        - musicpd.py
+        - test.py
     - if: $MUSICPD_TEST
 
 test-py3.11:
@@ -87,6 +87,10 @@ build:
       - dist/*.*
   rules:
     - if: $CI_PIPELINE_SOURCE == "push"
+      changes:
+        - .gitlab-ci.yml
+        - musicpd.py
+        - test.py
 
 tag_release:
   stage: build
@@ -104,6 +108,17 @@ tag_release:
   rules:
     - if: $CI_COMMIT_TAG
 
+# Documentation
+build_doc:
+  stage: build
+  script:
+    - pip install sphinx sphinx_rtd_theme
+    - sphinx-build doc/source -b html ./html -D html_theme=sphinx_rtd_theme
+  rules:
+    - if: $CI_PIPELINE_SOURCE == "push"
+      changes:
+        - doc/source/*
+
 pages:
   stage: build
   script: