From 38d8bdf56e69b13c36aca918244c7eeef7547de6 Mon Sep 17 00:00:00 2001
From: manuelpett <manuel.petit@inria.fr>
Date: Wed, 15 Jan 2025 08:24:46 +0100
Subject: [PATCH] Consolidate tutorial zipping into the anaconda job pages

---
 .gitlab-ci.yml | 45 ++++++++++++++++++++++-----------------------
 1 file changed, 22 insertions(+), 23 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7f8ca8a..ed0a9c7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -81,28 +81,6 @@ coverage:
       when: manual
       allow_failure: true
 
-zip_tutorials:
-  stage: post-deploy
-  needs:
-    - job: pages
-      artifacts: true
-  tags:
-    - linux
-    - large
-  image: continuumio/miniconda3
-  script:
-    - apt-get update && apt-get install zip -y
-    - echo "Zipping the tutorials folder..."
-    - zip -r public/tutorials.zip tutorials/
-  artifacts:
-    paths:
-      - public/tutorials.zip
-  rules:
-    - if: '$CI_COMMIT_REF_NAME == "hotfix/fix-doc-installation"'  # Test only on your hotfix branch
-      when: always
-    - if: '$CI_COMMIT_TAG'  # Run only on tag pipelines, e.g., for release tags
-      when: always
-
 anaconda :
   stage: deploy
   tags:
@@ -138,7 +116,7 @@ pages:
   image: continuumio/miniconda3
   script:
     # Install required 'libgl1' & 'pyvista xvfb' system dependency:
-    - apt-get update && apt-get install libgl1 libgl1-mesa-glx xvfb wget -y
+    - apt-get update && apt-get install libgl1 libgl1-mesa-glx xvfb wget zip -y
     # Download and install pandoc3.1.12.3 (version must be at least (2.14.2) but less than (4.0.0)):
     - wget https://github.com/jgm/pandoc/releases/download/3.1.12.3/pandoc-3.1.12.3-1-amd64.deb
     - dpkg -i pandoc-3.1.12.3-1-amd64.deb
@@ -152,6 +130,8 @@ pages:
     - python -m pip install -e .[doc]
     # Build the documentation with Sphinx:
     - sphinx-build -b html doc/ public/
+    - echo "Zipping the tutorials folder..."
+    - zip -r public/tutorials.zip tutorials/
   retry:
     max: 2
     when: runner_system_failure
@@ -196,6 +176,25 @@ docker_build_deploy:
   only:
     - tags
 
+#zip_tutorials:
+#  stage: post-deploy
+#  needs:
+#    - job: pages
+#      artifacts: true
+#  tags:
+#    - linux
+#    - large
+#  image: continuumio/miniconda3
+#  script:
+#    - apt-get update && apt-get install zip -y
+#    - echo "Zipping the tutorials folder..."
+#    - zip -r public/tutorials.zip tutorials/
+#  artifacts:
+#    paths:
+#      - public/tutorials.zip
+#  rules:
+#    - when: always # Always run after pages, regardless of branch or tag
+
 # For now, remove `create_release`, will be use later
 #create_release:
 #  stage: release
-- 
GitLab