Skip to content

Conversation

@florianduros
Copy link
Member

@florianduros florianduros commented Jan 28, 2026

Publish shared components storybook on cloudflare
https://github.com/element-hq/sre-internal/issues/3533

@florianduros florianduros added the T-Task Tasks for the team like planning label Jan 28, 2026
doc:
name: Publish Documentation
runs-on: ubuntu-latest
environment: SharedComponents
Copy link
Member

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

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
Copy link
Member

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

Copy link
Member Author

@florianduros florianduros Jan 28, 2026

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.

Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed it seems great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-Task Tasks for the team like planning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants