From 635c241956b925c74bc472bf87ef1408acf2947d Mon Sep 17 00:00:00 2001
From: nguyed99 <nguyed99@zedat.fu-berlin.de>
Date: Mon, 29 Jan 2024 22:29:54 +0100
Subject: [PATCH] Update CI to deploy webpage

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

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c9ffaa4..bc0df3b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,24 +3,39 @@ image: python:3.11-bullseye
 stages:
   - test-jobs
   - test-tasks
-
-before_script:
-  - pip install poetry
-  - poetry --version
-  - cd build/
-  - poetry install --no-root
-  - source $(poetry env info --path)/bin/activate
-  - cd ..
-
+  - build-page
 
 test-jobs:
   stage: test-jobs
   script:
+    - pip install poetry
+    - poetry --version
+    - cd build/
+    - poetry install --no-root
+    - source $(poetry env info --path)/bin/activate
+    - cd ..
     - export PYTHONPATH="$PYTHONPATH:$CI_PROJECT_DIR/jobs/src"
     - poetry run pytest jobs/tests/
 
 test-tasks:
   stage: test-tasks
   script:
+    - pip install poetry
+    - poetry --version
+    - cd build/
+    - poetry install --no-root
+    - source $(poetry env info --path)/bin/activate
+    - cd ..
     - export PYTHONPATH="$PYTHONPATH:$CI_PROJECT_DIR/tasks/src"
-    - poetry run pytest tasks/tests/
\ No newline at end of file
+    - poetry run pytest tasks/tests/
+  
+pages:
+  stage: build-page
+  script:
+    - mkdir .public
+    - cp -r website/* .public
+  artifacts:
+    paths:
+      - public
+  only:
+    - main
\ No newline at end of file
-- 
GitLab