mirror of https://gitlab.com/curben/blog
ci: ensure microblog/ is not empty
This commit is contained in:
parent
55ebe2520d
commit
8042d4195a
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue