From ed02fb0933dc2737a90188a8a7165c41a0bf812c Mon Sep 17 00:00:00 2001
From: MB <michael.blaschek@univie.ac.at>
Date: Tue, 26 Nov 2024 14:30:02 +0100
Subject: [PATCH] Update .gitlab-ci.yml file for automatic doc build

---
 .gitlab-ci.yml | 35 ++++++++++++++---------------------
 1 file changed, 14 insertions(+), 21 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 120138a..8142549 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,35 +1,28 @@
 stages:
-    - static
-    - dynamic
+  - dynamic
 
 default:
   tags:
     - podman
 
-static-copy:
-    stage: static
-    image: harbor.wolke.img.univie.ac.at/podman/alpine-sshpass:latest
-    when: manual
-    script:
-        - ls ./Documentation/html/
-        - sshpass -p "$WOLKE_PASSWORD" rsync -autv --delete -e "ssh -o StrictHostKeyChecking=no" ./Documentation/html/* "$WOLKE_USER@wolke.img.univie.ac.at:/var/www/flexpart/flexextract"
-
 build:
-    image: harbor.wolke.img.univie.ac.at/podman/flexextract_sphinx:latest
-    stage: dynamic
-    script:
-        # --strict is too strict :)
-        - cd For_developers/Sphinx
-        - make html
-    artifacts:
-        paths:
-            - For_developers/Sphinx/Documentation/html/*
-        expire_in: 60 seconds
+  image: harbor.wolke.img.univie.ac.at/podman/flexextract_sphinx:latest
+  stage: dynamic
+  script:
+    # --strict is too strict :)
+    - cd For_developers/Sphinx
+    - make html
+  artifacts:
+    paths:
+      - For_developers/Sphinx/Documentation/html/*
+    expire_in: 60 seconds
 
 deploy:
   stage: dynamic
   image: harbor.wolke.img.univie.ac.at/podman/alpine-sshpass:latest
+  rules:
+    - if: '$CI_COMMIT_REF_NAME == "master"'
   needs:
     - build
   script:
-        - sshpass -p "$WOLKE_PASSWORD" rsync -autv --delete -e "ssh -o StrictHostKeyChecking=no" ./For_developers/Sphinx/Documentation/html/* "$WOLKE_USER@wolke.img.univie.ac.at:/var/www/flexpart/flexextract"
+    - sshpass -p "$WOLKE_PASSWORD" rsync -autv --delete -e "ssh -o StrictHostKeyChecking=no" ./For_developers/Sphinx/Documentation/html/* "$WOLKE_USER@wolke.img.univie.ac.at:/var/www/flexpart/flexextract"
-- 
GitLab