-
Notifications
You must be signed in to change notification settings - Fork 40
Deploy Storybook to gh-pages from Travis #54
Conversation
@unindented, |
config/travis/build.sh
Outdated
# if [ "$TRAVIS_PULL_REQUEST" != "false" ] ; then | ||
# echo "This commit was made in a pull request. No build for you!" | ||
# exit 0 | ||
# fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be uncommented. I'm just seeing whether everything works fine in this PR.
995ea2f
to
2b32056
Compare
This is great work!!! I have been so slowed down by replacing the bundles and docs, every time. Thank you for doing this. |
We were using a mixture of && and npm-run-all. It's clearer if we use one for everything.
2b32056
to
15f7f6a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
storybook used to output to a folder in build/
, we moved it to docs/
for github pages. would it make sense to move it back to build now? we could do it later, not necessary right this moment
config/travis/build.sh
Outdated
set -o nounset | ||
|
||
if [ "$TRAVIS_BRANCH" != "master" ] ; then | ||
echo "This commit was made against $TRAVIS_BRANCH and not master. No build for you!" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of No build for you!
, should we give more build context and say something like Not generating updated docs on gh-pages branch.
? same for line 13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FAIR
@@ -91,13 +91,13 @@ | |||
"watch:css:components": "postcss \"src/components/**/*.css\" --dir \"dist/components\" --base \"src/components\" --watch", | |||
"watch:ts:components": "tsc --project . --watch", | |||
"watch": "run-p watch:**", | |||
"start:dev": "yarn build && run-p watch storybook:start", | |||
"start:dev": "npm-run-all build --parallel watch storybook:start", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this functionally the same, just with a different syntax?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. I didn't want to do the same thing in two different ways. I was also unsure how &&
behaves on Windows.
15f7f6a
to
4b466e5
Compare
package.json
Outdated
"clean:build": "rimraf build/*", | ||
"clean:dist": "rimraf dist/*", | ||
"clean": "run-p clean:*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since storybook is now in the build dir this could be
"clean": "run-p clean:build clean:dist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still good whenever you are happy with it
d148e83
to
c2401fe
Compare
c2401fe
to
50bf89f
Compare
Instead of committing the
docs
folder as part of every PR, I propose building it when Travis runs after a merge into master, and committing togh-pages
from Travis itself using a deploy key.Fixes #6
Fixes #53