From 546ce8f05be0c8ab73f2bf547b05f05f5e316d46 Mon Sep 17 00:00:00 2001
From: Miguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org>
Date: Thu, 14 Dec 2023 10:28:07 +0100
Subject: [PATCH] Stop if content.zip does not exist as no need to upgrade

---
 publish_on_pages.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/publish_on_pages.sh b/publish_on_pages.sh
index 38cc673..f6df54a 100644
--- a/publish_on_pages.sh
+++ b/publish_on_pages.sh
@@ -11,7 +11,13 @@ echo "TAG NAME:" $4
 echo "------ Get the previous GitLab Pages content --------"
 set +e
 curl --fail "$2/content.zip" -o "content.zip"
-if [ -e "content.zip" ]; then unzip "content.zip"; rm "content.zip"; fi
+if [ -e "content.zip" ]; then
+    unzip "content.zip";
+    rm "content.zip";
+else
+    echo 'Pages do not exist yet';
+    exit 0
+fi
 set -e
 
 echo "------ Add/update content --------"
-- 
GitLab