From 8042d4195a852ed8f7ab6c942b5f02d878b49ec4 Mon Sep 17 00:00:00 2001 From: Ming Di Leom <2809763-curben@users.noreply.gitlab.com> Date: Sat, 28 Sep 2024 22:34:00 +0000 Subject: [PATCH] ci: ensure microblog/ is not empty --- .gitlab-ci.yml | 2 +- check-homepage.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 07487e4..db39601 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,7 +37,7 @@ test: - sh check-homepage.sh rules: - - if: '$RENOVATE != "true" && $CI_COMMIT_REF_NAME == "master" && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "web")' + - if: '$RENOVATE != "true" && $CI_COMMIT_REF_NAME == "microblog" && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "web")' when: always artifacts: diff --git a/check-homepage.sh b/check-homepage.sh index f75e8ac..9e91089 100644 --- a/check-homepage.sh +++ b/check-homepage.sh @@ -5,12 +5,12 @@ HOMEPAGE="public/microblog/index.html" if [ ! -f "$HOMEPAGE" ]; then - echo "Error: homepage doesn't exist" + echo "Error: microblog doesn't exist" exit 1 else FILE_SIZE=$(ls -s "$HOMEPAGE" | cut -d" " -f1) if [ "$FILE_SIZE" = 0 ]; then - echo "Error: homepage is empty" + echo "Error: microblog is empty" exit 1 fi fi