From 6c8d620cf900d903f60af6a55c47538ce2f8b5bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ren=C3=A9=20Sch=C3=B6ne?= <rene.schoene@tu-dresden.de>
Date: Wed, 24 Nov 2021 16:41:44 +0100
Subject: [PATCH] =?UTF-8?q?use=20plain=20mkdocs=20instead=20of=20mike=20ag?=
 =?UTF-8?q?ain=20=F0=9F=98=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .gitlab-ci.yml | 48 ++++++++++++++++++++++++++++++++----------------
 1 file changed, 32 insertions(+), 16 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 127cb13..3325755 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,6 +8,7 @@ stages:
   - ragdoc_build
   - ragdoc_view
   - publish
+  - docu-dev
 
 before_script:
   - export GRADLE_USER_HOME=`pwd`/.gradle
@@ -95,27 +96,42 @@ pages:
   needs:
     - ragdoc_view
     - test
-  variables:
-    PAGES_BRANCH: pages
-    HTTPS_REMOTE: https://${PROJECT_BOT_USER}:${PROJECT_BOT_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git
   before_script:
-    - apt update && apt install git-lfs
     - pip install -r pages/requirements.txt
-    - git config user.name $PROJECT_BOT_USER
-    - git config user.email $PROJECT_BOT_USER@git-st.inf.tu-dresden.de
-    - git fetch -f origin $PAGES_BRANCH:$PAGES_BRANCH || echo "Pages branch not deployed yet."
-    - git checkout $CI_COMMIT_SHA
   script:
-    - cd pages
-    - export VERSION=$(python main.py)
-    - echo $VERSION
-    - mike list --json --prefix public -r $HTTPS_REMOTE -b $PAGES_BRANCH
-    - mike deploy --rebase --prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH --update-aliases $VERSION
-    - cd ..
-    - git checkout $PAGES_BRANCH -- public/
+    - cd pages && mkdocs build
   artifacts:
     paths:
       - public/
   only:
-    - dev
     - master
+
+pages-dev:
+  image: python:3.10.0-bullseye
+  stage: publish
+  needs:
+    - ragdoc_view
+    - test
+  before_script:
+    - pip install -r pages/requirements.txt
+  script:
+    - cd pages && mkdocs build
+    - echo "UPSTREAM_JOB_ID=$CI_JOB_ID" >> build.env
+  artifacts:
+    paths:
+      - public/
+    reports:
+      dotenv: build.env
+  only:
+    - dev
+
+downstream-job:
+  stage: docu-dev
+  variables:
+    UPSTREAM_BRANCH: $CI_COMMIT_REF_NAME
+  trigger: jastadd/ragconnect-dev
+  needs:
+    - job: pages-dev
+      artifacts: true
+  only:
+    - dev
-- 
GitLab