[6x.] Storybook cloudflare#19213
Open
brianjhanson wants to merge 12 commits into
Open
Conversation
Deploys both the @craftcms/cp Storybook (packages/craftcms-cp) and the resources/js Storybook to separate Cloudflare Pages projects, with PR preview URLs commented on each pull request and production deploys on push to 6.x. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
4 tasks
|
@craftcms/cp Storybook preview: https://6faf8634.craftcms-ui-storybook.pages.dev |
|
resources/js Storybook preview: https://6b87ccc7.craftcms-storybook.pages.dev |
📚 Storybook previews@craftcms/cp — open Storybook No changed components detected in this Storybook. resources/js — open Storybook No changed components detected in this Storybook. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds CI automation to build and deploy Storybook previews (and production builds on 6.x) to Cloudflare Pages for both the @craftcms/cp component library and the app-level resources/js Storybook, including a PR comment that links to deployed previews.
Changes:
- Add a unified GitHub Actions workflow to build assets, deploy both Storybooks to Cloudflare Pages, and post/update a single PR comment with preview links.
- Ensure
@craftcms/cpStorybook builds have an up-to-date custom elements manifest available by runningbuild:manifestautomatically. - Minor housekeeping updates: move
@keyframesout of:root, and update npm lockfile deps (esbuild/ws).
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/craftcms-cp/src/styles/shared/variables.css | Closes :root before animation keyframes so @keyframes live at top-level. |
| packages/craftcms-cp/package.json | Adds prestorybook / prebuild:storybook hooks to generate the custom elements manifest before Storybook runs/builds. |
| package.json | Reorders a devDependency entry (no functional change). |
| package-lock.json | Updates lockfile entries (notably esbuild to 0.28.1 and ws to 8.21.0). |
| .github/workflows/storybook.yml | New workflow to build/cache assets, deploy both Storybooks to Cloudflare Pages, and post PR preview links. |
| .github/scripts/storybook-preview-comment.cjs | New script to create/update a single PR comment containing Storybook preview links and deep links for changed components. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.github/workflows/storybook.ymlto build and deploy the@craftcms/cpStorybook (packages/craftcms-cp) and the CP storybook (root.storybookconfig) to a Cloudflare Pages project (craftcms-cp-storybook)When a PR is created that touches files in either of those packages, a preview of the storybook will be deployed and a comment will be added to the PR.