From b751decefeedc275717dac4b129d728f299c3649 Mon Sep 17 00:00:00 2001 From: meriadec Date: Tue, 16 Jan 2018 16:02:44 +0100 Subject: [PATCH] Ability to deploy the storybook to gh-pages --- .gitignore | 1 + package.json | 2 +- scripts/publish-storybook.sh | 13 +++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 scripts/publish-storybook.sh diff --git a/.gitignore b/.gitignore index 62fc32ad..d516939f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ /flow-typed/ /node_modules/ /static/ +/storybook-static/ thumbs.db diff --git a/package.json b/package.json index ab312959..7cb8b5b9 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "flow": "flow", "lint": "eslint src webpack .storybook", "storybook": "start-storybook -p 4444", - "build-storybook": "build-storybook" + "publish-storybook": "bash ./scripts/publish-storybook.sh" }, "electronWebpack": { "renderer": { diff --git a/scripts/publish-storybook.sh b/scripts/publish-storybook.sh new file mode 100755 index 00000000..20ed7ca2 --- /dev/null +++ b/scripts/publish-storybook.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e + +rm -rf storybook-static +./node_modules/.bin/build-storybook +cd storybook-static +git init +git remote add origin git@github.com:LedgerHQ/ledger-wallet-desktop.git +git add . +git commit -m 'deploy storybook' +git push -f origin master:gh-pages +printf "deployed with success!"