diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 854c03889..b5213f21f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -293,6 +293,21 @@ test:contentgen: <<: *ra_only when: manual +test:storybook: + stage: tests + environment: + url: https://${CI_ENVIRONMENT_SLUG}-${CI_PROJECT_PATH_SLUG}.${REVIEW_DOMAIN} + name: review/$CI_COMMIT_REF_NAME + on_stop: stop_review + script: + - cd ${BUILD_DIR} + - make build-storybook + dependencies: + - deploy:review + <<: *ra_tags + <<: *ra_only + when: manual + report:statusreportval: stage: reports environment: diff --git a/scripts/makefile/front.mk b/scripts/makefile/front.mk index 87b661a07..1b9cc8734 100644 --- a/scripts/makefile/front.mk +++ b/scripts/makefile/front.mk @@ -35,7 +35,6 @@ front-build: $(call frontexec, node -v); \ $(call frontexec, yarn -v); \ $(call frontexec, yarn build --verbose); \ - $(call frontexec, yarn build-storybook -c .storybook -o dist/storybook --verbose) else \ echo "- Theme directory defined in .env file was not found. Skipping front-build."; \ fi @@ -56,3 +55,10 @@ storybook: docker pull $(IMAGE_FRONT) $(call frontexec, yarn install --ignore-optional --check-files) $(call frontexec, yarn storybook -p $(FRONT_PORT)) + +build-storybook: + @echo "Export storybook..." + docker pull $(IMAGE_FRONT) + $(call frontexec, yarn install --ignore-optional --check-files) + $(call frontexec, yarn run build); + $(call frontexec, yarn run build-storybook -c .storybook -o dist/storybook)