diff --git a/.ci/deploy.sh b/.ci/deploy.sh
index ffe716afc9cab17442e6d7c664097ec67297f6ba..17d4410e3130e1382edd579fe766ee2531e845f1 100644
--- a/.ci/deploy.sh
+++ b/.ci/deploy.sh
@@ -9,11 +9,14 @@ echo $rootDir
 rm -rf $rootDir/public
 mkdir $rootDir/public
 
-# create img folders
-#mkdir $rootDir/public/img
-#mkdir $rootDir/public/img/unstable
-#mkdir $rootDir/public/img/latest
-#mkdir $rootDir/public/img/stable
+# define the branch
+if [[ $CI_COMMIT_BRANCH == "develop" ]]; then
+    version="latest"
+elif [[ $CI_COMMIT_BRANCH == "master" ]]; then
+    version="stable"
+else
+    version="unstable"
+fi
 
 # loop through all the presentations
 nBlades=0
@@ -32,9 +35,7 @@ do
 
                 # create the required folders in public
                 mkdir $rootDir/public/$BLADE
-                #mkdir $rootDir/public/$BLADE/unstable
-                mkdir $rootDir/public/$BLADE/latest
-                #mkdir $rootDir/public/$BLADE/stable
+                mkdir $rootDir/public/$BLADE/$version
 
                 # change to the blade directory to be built
                 cd $BLADE
@@ -53,7 +54,7 @@ do
                 yarn install
 
                 grunt dist
-                mv public/* $rootDir/public/$BLADE/latest/.
+                mv public/* $rootDir/public/$BLADE/$version/.
 
                 echo " > latest built for file set ${BLADE}"