Skip to content

Commit

Permalink
Publishing storybook using circle-ci (mattermost#4037)
Browse files Browse the repository at this point in the history
* Publishing storybook using circle-ci
  • Loading branch information
jespino authored and Carlos Tadeu Panato Junior committed Oct 27, 2019
1 parent b9d56dc commit 330be4d
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,34 @@ jobs:
root: .
paths: .

build-storybook:
executor:
name: default
steps:
- checkout
- *restore_cache
- run: npm run build-storybook
- store_artifacts:
path: ~/mattermost-webapp/storybook-static
- persist_to_workspace:
root: .
paths: .

upload-storybook:
docker:
- image: circleci/python:3.6
steps:
- attach_workspace:
at: .
- aws-s3/sync:
from: storybook-static
to: s3:https://alpha-storybook.mattermost.com/$(echo "${CIRCLE_BRANCH}" | sed 's/pull\//PR-/g' | sed 's/^master$//g')/
arguments: --cache-control no-cache
- aws-s3/sync:
from: storybook-static
to: s3:https://alpha-storybook.mattermost.com/commit/${CIRCLE_SHA1}/
arguments: --cache-control no-cache

upload-s3:
docker:
- image: circleci/python:3.6
Expand Down Expand Up @@ -173,6 +201,13 @@ workflows:
context: matterbuild-docker
requires:
- prepare-docker-build
- build-storybook:
requires:
- build
- upload-storybook:
context: mattermost-s3-storybook-alpha
requires:
- build-storybook
- test:
requires:
- type-check
Expand Down

0 comments on commit 330be4d

Please sign in to comment.