From eb8e9b8d97945bac4809043fd3ef2cdf49fa39c2 Mon Sep 17 00:00:00 2001
From: Kwangjin Lee <k.lee-5@student.tudelft.nl>
Date: Fri, 23 Aug 2024 10:29:49 +0200
Subject: [PATCH] Update .gitlab-ci.yml file

---
 .gitlab-ci.yml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8e85e76..638c183 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -14,11 +14,17 @@ cache:
 before_script:
   - bundle config set --local path 'vendor/bundle'
   - bundle install
+  - apt-get update && apt-get install -y yq
 
 build-page:
   stage: build
   script:
-    - JEKYLL_ENV=production bundle exec jekyll build --config _config.yml --destination public
+    - >
+      if [ "$CI_COMMIT_BRANCH" = "publish" ]; then
+        ./build_page.sh "/2024/" true
+      else
+        ./build_page.sh "/2024/draft/" false
+      fi
     - echo "Listing contents of public directory:"
     - ls -laR public
   artifacts:
-- 
GitLab