From 15938dad65af108e8552d873ee3e57ebf0fe8071 Mon Sep 17 00:00:00 2001
From: Lena Buffoni <lena.buffoni@liu.se>
Date: Mon, 23 Sep 2024 10:29:23 +0000
Subject: [PATCH] Update .gitlab-ci.yml file

---
 .gitlab-ci.yml | 38 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 37 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 062de47..222ac14 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,2 +1,38 @@
-# The Docker image that will be used to build your app
+#
+# Before using this .gitlab-ci.yml:
+#
+# - This example uses the latest Docker image, but you might want to use the
+#   exact version to avoid any broken pipelines.
+#   All available Hugo versions are listed under https://gitlab.com/pages/hugo/container_registry.
+# - Read about the difference between hugo and hugo_extended
+#   https://gitlab.com/pages/hugo/-/blob/main/README.md#hugo-vs-hugo_extended.
+# - To change the theme, see
+#   https://gitlab.com/pages/hugo/-/blob/main/README.md#use-a-custom-theme.
+#
 image: registry.gitlab.com/pages/hugo/hugo_extended:latest
+
+variables:
+  HUGO_ENV: production
+  THEME_URL: "github.com/theNewDynamic/gohugo-theme-ananke"
+
+default:
+  before_script:
+    - apk add --no-cache go curl bash nodejs
+    - hugo mod get -u $THEME_URL
+    ## Uncomment the following if you use PostCSS. See https://gohugo.io/hugo-pipes/postcss/
+    #- npm install postcss postcss-cli autoprefixer
+
+test:
+  script:
+    - hugo
+  rules:
+    - if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
+
+pages:
+  script:
+    - hugo
+  artifacts:
+    paths:
+      - public
+  rules:
+    - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
-- 
GitLab