UI: add a command to build static storybook for deploying to netlify (#8028)

* add a command to build static storybook for deploying to netlify

* add storybook deploys to the ui readme
This commit is contained in:
Matthew Irish 2020-01-06 16:01:34 -06:00 committed by GitHub
parent 549faf47f2
commit a6617e1958
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

1
ui/.gitignore vendored
View File

@ -3,6 +3,7 @@
# compiled output # compiled output
/dist/ /dist/
/tmp/ /tmp/
/storybook-static/
# dependencies # dependencies
/bower_components/ /bower_components/

View File

@ -110,7 +110,6 @@ setting `VAULT_UI` environment variable.
## Vault Storybook ## Vault Storybook
The Vault UI uses Storybook to catalog all of its components. Below are details for running and contributing to Storybook. The Vault UI uses Storybook to catalog all of its components. Below are details for running and contributing to Storybook.
### Storybook Commands at a Glance ### Storybook Commands at a Glance
| Command | Description | | Command | Description |
@ -164,6 +163,9 @@ See the [Storybook Docs](https://storybook.js.org/docs/basics/introduction/) for
It is important to add all new components into Storybook and to keep the story and notes files up to date. To ease the process of creating and updating stories please use the code generators using the [commands listed above](#storybook-commands-at-a-glance). It is important to add all new components into Storybook and to keep the story and notes files up to date. To ease the process of creating and updating stories please use the code generators using the [commands listed above](#storybook-commands-at-a-glance).
### Storybook Deployment
A Netlify integration deploys a static Storybook build for any PR on the Vault GitHub repo. A preview link will show up in the PR checks. Once items are merged, the auto-deployed integration will publish that build making it available at [https://vault-storybook.netlify.com](https://vault-storybook.netlify.com). Currently the Netlify integration will cd into the `ui/` directory and then run `yarn deploy:storybook` so troubleshooting any issues can be done locally by running this same command. The logs for this build are public and will be linked from the PR checks.
## Further Reading / Useful Links ## Further Reading / Useful Links

View File

@ -25,6 +25,7 @@
"test:quick-oss": "yarn test:quick -f='!enterprise'", "test:quick-oss": "yarn test:quick -f='!enterprise'",
"build:storybook": "build-storybook -s ../pkg/web_ui", "build:storybook": "build-storybook -s ../pkg/web_ui",
"storybook": "start-storybook -p 6006 -s ../pkg/web_ui", "storybook": "start-storybook -p 6006 -s ../pkg/web_ui",
"deploy:storybook": "yarn build && yarn build:storybook",
"gen-story-md": "node scripts/gen-story-md.js" "gen-story-md": "node scripts/gen-story-md.js"
}, },
"lint-staged": { "lint-staged": {