From dfb4bdb1284610621a97c2d8efadc627e84e382f Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Sun, 6 May 2018 14:35:27 -0700 Subject: [PATCH 1/2] Set up forking logic for deploy paths --- .travis.yml | 2 ++ Makefile | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/.travis.yml b/.travis.yml index 7c9af828b..7fc62c2ce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,3 +13,5 @@ matrix: - env: SUITE=COMPONENT_LIBRARY script: - yarn run travis +after_success: + - make deploy diff --git a/Makefile b/Makefile index eba9f7912..cd928b44d 100644 --- a/Makefile +++ b/Makefile @@ -42,3 +42,29 @@ 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"; From f7a65f414f2ee4872b7fb6cad93b1d0a0670c8b7 Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Sun, 6 May 2018 14:36:14 -0700 Subject: [PATCH 2/2] Deploy storybook when the component lib test suite passes Only on the master branch --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cd928b44d..bdd94dca8 100644 --- a/Makefile +++ b/Makefile @@ -67,4 +67,5 @@ deploy-2018: echo "2018 build and deploy stub" deploy-component-library: - echo "Deploying the component library"; + @echo "Deploying the component library"; + yarn run deploy-storybook -- --ci;