From 2400d88d1f27a91a8bcf27aac1fb8f231e626922 Mon Sep 17 00:00:00 2001
From: laurentheirendt <laurent.heirendt@uni.lu>
Date: Thu, 25 Apr 2019 16:30:28 +0200
Subject: [PATCH] fix urls

---
 .ci/deploy.sh | 29 ++++++++++-------------------
 1 file changed, 10 insertions(+), 19 deletions(-)

diff --git a/.ci/deploy.sh b/.ci/deploy.sh
index b2ca0085..3f9bd681 100644
--- a/.ci/deploy.sh
+++ b/.ci/deploy.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-PAGEURL="https://r3.pages.uni.lu/school/theme"
+PAGEURL="https://r3.pages.uni.lu/outreach/presentations"
 
 rootDir=$(pwd)
 echo $rootDir
@@ -22,17 +22,9 @@ do
                 # create the required folders in public
                 mkdir $rootDir/public
                 mkdir $rootDir/public/$BLADE
-
-                # determine the folder of the branch
-                dirName="unstable"
-                if [[ $CI_COMMIT_REF_NAME == "develop" ]]; then
-                    dirName="latest"
-                elif [[ $CI_COMMIT_REF_NAME == "master" ]]; then
-                    dirName="stable"
-                fi
-
-                # make the local folder
-                mkdir $rootDir/public/$BLADE/$dirName
+                mkdir $rootDir/public/$BLADE/unstable
+                mkdir $rootDir/public/$BLADE/latest
+                mkdir $rootDir/public/$BLADE/stable
 
                 # change to the blade directory to be built
                 cd $BLADE
@@ -41,11 +33,10 @@ do
                 npm install -g npm@latest yo grunt-cli generator-reveal
                 npm install
 
-                if [[ $dirName == "unstable" ]]; then
-                    git submodule update --init
-                    grunt dist
-                    mv public/* $rootDir/public/$BLADE/$dirName/.
-                fi
+                # build the unstable version - can be optimized
+                git submodule update --init
+                grunt dist
+                mv public/* $rootDir/public/$BLADE/unstable/.
 
                 # build the master version into stable
                 git fetch --tags
@@ -53,7 +44,7 @@ do
                 git checkout $latestTag
                 git submodule update --init
                 grunt dist
-                mv public/* $rootDir/public/$BLADE/$dirName/.
+                mv public/* $rootDir/public/$BLADE/stable/.
 
                 # build the develop version into latest
                 git checkout -f develop
@@ -61,7 +52,7 @@ do
                 git reset --hard origin/develop
                 git submodule update --init
                 grunt dist
-                mv public/* $rootDir/public/$BLADE/$dirName/.
+                mv public/* $rootDir/public/$BLADE/latest/.
 
                 # auto redirect file to the stable version
                 echo '<html>\n
-- 
GitLab