Skip to content

Commit

Permalink
Merge pull request #105 from hackoregon/storybook-cd
Browse files Browse the repository at this point in the history
Storybook Continuous Delivery
  • Loading branch information
jaronheard authored May 6, 2018
2 parents 7ff96b1 + f7a65f4 commit c843fe5
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ matrix:
- env: SUITE=COMPONENT_LIBRARY
script:
- yarn run travis
after_success:
- make deploy
27 changes: 27 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,30 @@ travis:
@if [ "$$SUITE" = "COMPONENT_LIBRARY" ]; then \
cd packages/component-library && yarn test && cd -; \
fi

deploy:
@if [ -z "$$TRAVIS_PULL_REQUEST" ] || [ "$$TRAVIS_PULL_REQUEST" = "false" ]; then \
echo "Not a PR..."; \
if [ "$$TRAVIS_BRANCH" = "master" ]; then \
echo "On the master branch..."; \
if [ "$$SUITE" = "2017" ]; then \
make deploy-2017; \
fi; \
if [ "$$SUITE" = "2018" ]; then \
make deploy-2018; \
fi; \
if [ "$$SUITE" = "COMPONENT_LIBRARY" ]; then \
make deploy-component-library; \
fi \
fi \
fi

deploy-2017:
echo "2017 build and deploy stub"

deploy-2018:
echo "2018 build and deploy stub"

deploy-component-library:
@echo "Deploying the component library";
yarn run deploy-storybook -- --ci;

0 comments on commit c843fe5

Please sign in to comment.