Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Deploy Storybook to gh-pages from Travis #54

Merged
merged 5 commits into from
Sep 15, 2017
Merged

Conversation

unindented
Copy link
Contributor

@unindented unindented commented Sep 14, 2017

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 to gh-pages from Travis itself using a deploy key.

Fixes #6
Fixes #53

@msftclas
Copy link

@unindented,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

# if [ "$TRAVIS_PULL_REQUEST" != "false" ] ; then
# echo "This commit was made in a pull request. No build for you!"
# exit 0
# fi
Copy link
Contributor Author

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.

@unindented unindented force-pushed the dalvarez-gh-pages branch 7 times, most recently from 995ea2f to 2b32056 Compare September 15, 2017 16:51
@annr
Copy link
Contributor

annr commented Sep 15, 2017

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.
Copy link
Contributor

@swese44 swese44 left a 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

set -o nounset

if [ "$TRAVIS_BRANCH" != "master" ] ; then
echo "This commit was made against $TRAVIS_BRANCH and not master. No build for you!"
Copy link
Contributor

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

Copy link
Contributor Author

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",
Copy link
Contributor

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?

Copy link
Contributor Author

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.

package.json Outdated
"clean:build": "rimraf build/*",
"clean:dist": "rimraf dist/*",
"clean": "run-p clean:*",
Copy link
Contributor

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

Copy link
Contributor

@swese44 swese44 left a 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

@unindented unindented merged commit 256f926 into master Sep 15, 2017
@unindented unindented deleted the dalvarez-gh-pages branch September 15, 2017 21:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants