carbon-platform
carbon-platform copied to clipboard
Add Storybook deployment to PRs
Every time a PR is opened, reopened or pushed to, a storybook preview url is added to the PR
NEW SOLUTION:
- Create a new IBM Cloud Object Storage bucket "mdx-components-pr-builds"
- Every time a pr is opened, reopened or pushed to and storybook files are changed:
- build storybook
- push build artifacts to the new bucket under pr/[PR_NUMBER]/*
- add a github comment to the pr with the deployment link
- Every time a pr is opened, reopened or pushed to and storybook files are changed:
- Set a retention policy on the COS bucket to delete stale files
(previous solution) Will solve this with github actions: From #694
- Create github action inside carbon-platform repo with the following specifications:
- Every time a pr is opened, reopened or pushed to and storybook files are changed:
- build storybook , output to docs-build folder
- commit output folder to repo from step 1 (docs/pr/{PR_NUMBER}) (might or might not need a github token for this, TBD)
- Optional but recommended: github action to delete PR folder in separate repo when PR is merged in or closed so that deployment gets deleted.
Confirmed will need a token, working example: https://github.com/francinelucca/storybook-test/blob/main/.github/workflows/storybook.yml
Hey team! Please add your planning poker estimate with ZenHub @alisonjoseph @andreancardona @jdharvey-ibm
@carbon-design-system/carbon-platform-devs do we still want to do this for our MDX docs in Storybook (https://platform.carbondesignsystem.com)? If so, we can keep this in our backlog. Just checking.
I discussed this implementation briefly with @jdharvey-ibm last week and my understanding is we're still aiming to move forward on this. Definitely open to discussion though!
Yeah! We absolutely want this. This is a really important and wide-reaching external, so having PR deploy previews, snapshots, and Percy VRT hooked up to it will be super useful.