-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Publish shared components storybook #31907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
8f4337a to
dccb29e
Compare
dccb29e to
7a924c4
Compare
7a924c4 to
f303dce
Compare
f303dce to
1485b36
Compare
1485b36 to
71d86c4
Compare
| doc: | ||
| name: Publish Documentation | ||
| runs-on: ubuntu-latest | ||
| environment: SharedComponents |
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.
IMO the environment should be Cloudflare Pages given the creds aren't scoped to a single site AIUI, for easier re-use for other CFP sites
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.
Florian asked me about it so I'll answer.
Tokens for Pages are indeed not scoped to one deployment on Cloudflare, but I still believe it's better to separate usage instead of reusing the same token for too many Pages. I try to keep token name on CF side explicit, so we can easily rotate/invalidate the correct token.
Unless it's harder to manage on the long-run for you, I'd rather keep it like that. That's also what we did for EW deployment.
| with: | ||
| apiToken: ${{ secrets.CF_PAGES_TOKEN }} | ||
| accountId: ${{ secrets.CF_PAGES_ACCOUNT_ID }} | ||
| command: pages deploy _docs --project-name=shared-components-docs |
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.
Could we not embed the docs within storybook? Using something like this https://storybook.js.org/addons/@ts2doc/storybook-addon or just a link + putting _docs in a subdirectory of the built storybook, feels nuts to have 2 sites pushing on the same trigger to different places when they are related
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.
Embedded in the storybook stories is not enough because the package also exposed some functions or class (like all the i18n stuff). I'll take a look at putting it in a subdir.
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.
Yes, that is what the thing I linked is for @florianduros - the example used is of a doc for a Typescript interface being shown in storybook - or a technique like https://stackoverflow.com/a/76614474
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.
Indeed it seems great
9cb76ad to
c7c3358
Compare
da8f9d3 to
fc0a0f7
Compare
fc0a0f7 to
298a001
Compare
a55ffbe to
afc471d
Compare
afc471d to
39fdca8
Compare
Publish shared components storybook on cloudflare
https://github.com/element-hq/sre-internal/issues/3533