From 6a320bc33eac0f53c87b53d6331c03f1ebac9cdf Mon Sep 17 00:00:00 2001
From: Dominik George <dominik.george@teckids.org>
Date: Tue, 9 Apr 2024 00:13:45 +0200
Subject: [PATCH] Also build pages again

---
 .gitlab-ci.yml | 26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index de41f6c6..78b7247c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,24 +4,38 @@ variables:
   STORAGE_DRIVER: vfs
   BUILDAH_FORMAT: docker
   BUILDAH_ISOLATION: chroot
-
-default:
-  before_script:
-    - buildah login -u "$CI_REGISTRY_USER" --password $CI_REGISTRY_PASSWORD $CI_REGISTRY
+  GIT_SUBMODULE_STRATEGY: recursive
 
 stages:
   - build
   - deploy
 
-build:
+build docker image:
   stage: build
   script:
     - buildah bud -t teckids.org:latest
   interruptible: true
   retry: 1
 
-deploy:
+build pages:
+  stage: build
+  before_script:
+  - apk add --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ zola
+  - apk add yarn
+  - yarn install
+  script:
+  - zola build
+  - cp _redirects public/
+  artifacts:
+    paths:
+    - public/
+  only:
+  - master
+
+push docker image:
   stage: deploy
+  before_script:
+    - buildah login -u "$CI_REGISTRY_USER" --password $CI_REGISTRY_PASSWORD $CI_REGISTRY
   script:
     - buildah push teckids.org:latest
 
-- 
GitLab