Skip to content

[6x.] Storybook cloudflare#19213

Open
brianjhanson wants to merge 12 commits into
6.xfrom
feature/storybook-cloudflare
Open

[6x.] Storybook cloudflare#19213
brianjhanson wants to merge 12 commits into
6.xfrom
feature/storybook-cloudflare

Conversation

@brianjhanson

@brianjhanson brianjhanson commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds .github/workflows/storybook.yml to build and deploy the @craftcms/cp Storybook (packages/craftcms-cp) and the CP storybook (root .storybook config) 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.

brianjhanson and others added 2 commits July 6, 2026 10:06
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>
@brianjhanson brianjhanson changed the title Feature/storybook cloudflare [6x.] Storybook cloudflare Jul 6, 2026
@brianjhanson brianjhanson marked this as a duplicate of #19208 Jul 8, 2026
@brianjhanson brianjhanson reopened this Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

@craftcms/cp Storybook preview: https://6faf8634.craftcms-ui-storybook.pages.dev

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

resources/js Storybook preview: https://6b87ccc7.craftcms-storybook.pages.dev

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

📚 Storybook previews

@craftcms/cpopen Storybook

No changed components detected in this Storybook.

resources/jsopen Storybook

No changed components detected in this Storybook.

@brianjhanson brianjhanson marked this pull request as ready for review July 8, 2026 15:52
@brianjhanson brianjhanson requested a review from Copilot July 8, 2026 17:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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/cp Storybook builds have an up-to-date custom elements manifest available by running build:manifest automatically.
  • Minor housekeeping updates: move @keyframes out 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.

Comment thread .github/scripts/storybook-preview-comment.cjs
Comment thread .github/workflows/storybook.yml
Comment thread .github/workflows/storybook.yml
brianjhanson and others added 2 commits July 8, 2026 13:09
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants