Skip to content

Commit

Permalink
Added optional static storybook generation
Browse files Browse the repository at this point in the history
  • Loading branch information
iberdinsky-skilld committed Mar 2, 2020
1 parent 380df20 commit 3f03960
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 7 additions & 1 deletion scripts/makefile/front.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

0 comments on commit 3f03960

Please sign in to comment.