From 391995db32b8e67ae237d61aa46076a7bbc028d2 Mon Sep 17 00:00:00 2001
From: "orestis.malaspin" <orestis.malaspinas@hesge.ch>
Date: Thu, 13 Jul 2023 08:57:22 +0200
Subject: [PATCH] Resolve "add gitlab-ci stages"

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

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1f2662d..d30a252 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -34,19 +34,33 @@ before_script:
   - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
   - chmod 644 ~/.ssh/known_hosts
 
+stages:
+  - test
+  - build
+  - deploy
+
 test:cargo:
+  stage: test
   script:
     - rustc --version && cargo --version  # Print version info for debugging
 
-run_test_doc:
+build:codes:
+  stage: build
   script:
     - cd codes
     - ./run_tests.sh
-    - cd ../book
+  
+build:book:
+  stage: build
+  script:
+    - cd book
     - mdbook test
     - mdbook build
 
-run_deploy_book:
+deploy:book:
+  stage: deploy
+  only:
+    - main
   script:
     - cd book
     - mdbook build
-- 
GitLab