From 5065de8506efa2457fcdfabbb00ee4614b54299a Mon Sep 17 00:00:00 2001
From: Amir MOHAMMADI <amir.mohammadi@idiap.ch>
Date: Fri, 22 Sep 2017 09:39:11 +0200
Subject: [PATCH] always upload documentation for all branches

---
 gitlab/functions.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gitlab/functions.sh b/gitlab/functions.sh
index 979ef64..185a9d8 100644
--- a/gitlab/functions.sh
+++ b/gitlab/functions.sh
@@ -351,9 +351,9 @@ fi
 
 DOC_UPLOADS=()
 
-if [[ "${IS_MASTER}" == "true" ]]; then
-  DOC_UPLOADS+=("${DOC_SERVER_PREFIX}/master/")
-fi
+# always upload documentation for all branches. Ideally this is only called
+# when in master.
+DOC_UPLOADS+=("${DOC_SERVER_PREFIX}/${CI_COMMIT_REF_NAME}/")
 
 if [[ -n "${CI_COMMIT_TAG}" ]]; then
   DOC_UPLOADS+=("${DOC_SERVER_PREFIX}/${CI_COMMIT_TAG}/")
-- 
GitLab