diff --git a/.ci/deploy.sh b/.ci/deploy.sh index b2ca00855ba661710b8fd70278fc4fb4e97129ac..3f9bd68164b2bff3c5d6dbf43593b3a0a16042a3 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