From 4c12233b111def9a4b124c0ea4ad2c5eaec77c7f Mon Sep 17 00:00:00 2001 From: Lena Morita Date: Fri, 3 Jan 2025 00:06:43 +0900 Subject: [PATCH 1/5] Check Storybook build on CI for PRs --- .github/workflows/storybook-check.yml | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/storybook-check.yml diff --git a/.github/workflows/storybook-check.yml b/.github/workflows/storybook-check.yml new file mode 100644 index 0000000000000..4e430dc017cd6 --- /dev/null +++ b/.github/workflows/storybook-check.yml @@ -0,0 +1,28 @@ +name: Check Storybook build + +on: pull_request + +# Cancels all previous workflow runs for pull requests that have not completed. +concurrency: + # The concurrency group contains the workflow name and the branch name for pull requests + # or the commit hash for any other events. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + +jobs: + deploy: + runs-on: ubuntu-latest + if: ${{ github.repository == 'WordPress/gutenberg' }} + + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + ref: trunk + show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} + + - name: Setup Node.js and install dependencies + uses: ./.github/setup-node + + - name: Build Storybook + run: npm run storybook:build From fdf8121235296e036646fa58a90bd12c3a2c06c9 Mon Sep 17 00:00:00 2001 From: Lena Morita Date: Fri, 3 Jan 2025 00:24:06 +0900 Subject: [PATCH 2/5] Test breakage --- packages/edit-site/src/components/layout/style.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/edit-site/src/components/layout/style.scss b/packages/edit-site/src/components/layout/style.scss index 8d44015d52967..caf7dd78da4b3 100644 --- a/packages/edit-site/src/components/layout/style.scss +++ b/packages/edit-site/src/components/layout/style.scss @@ -118,7 +118,7 @@ // This ensure the radius work properly. overflow: hidden; - @media (prefers-reduced-motion: no-preference) { + @media not (prefers-reduced-motion) { transition: border-radius, box-shadow 0.4s; } From e3ed3208a2ab3d0f243a20ebd5d554154cc289bf Mon Sep 17 00:00:00 2001 From: Lena Morita Date: Fri, 3 Jan 2025 00:45:41 +0900 Subject: [PATCH 3/5] =?UTF-8?q?Fix=20=F0=9F=98=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/storybook-check.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/storybook-check.yml b/.github/workflows/storybook-check.yml index 4e430dc017cd6..8db6a6b62dd92 100644 --- a/.github/workflows/storybook-check.yml +++ b/.github/workflows/storybook-check.yml @@ -10,7 +10,7 @@ concurrency: cancel-in-progress: true jobs: - deploy: + check: runs-on: ubuntu-latest if: ${{ github.repository == 'WordPress/gutenberg' }} @@ -18,7 +18,6 @@ jobs: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: - ref: trunk show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - name: Setup Node.js and install dependencies From 9233cc9ba272349e18e5e4dc3446d0fdec7c6c2c Mon Sep 17 00:00:00 2001 From: Lena Morita Date: Mon, 6 Jan 2025 15:08:43 +0900 Subject: [PATCH 4/5] Revert "Test breakage" This reverts commit fdf8121235296e036646fa58a90bd12c3a2c06c9. --- packages/edit-site/src/components/layout/style.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/edit-site/src/components/layout/style.scss b/packages/edit-site/src/components/layout/style.scss index caf7dd78da4b3..8d44015d52967 100644 --- a/packages/edit-site/src/components/layout/style.scss +++ b/packages/edit-site/src/components/layout/style.scss @@ -118,7 +118,7 @@ // This ensure the radius work properly. overflow: hidden; - @media not (prefers-reduced-motion) { + @media (prefers-reduced-motion: no-preference) { transition: border-radius, box-shadow 0.4s; } From 2d73623fbdf806512c28bba8d575a27896b1779c Mon Sep 17 00:00:00 2001 From: Lena Morita Date: Tue, 7 Jan 2025 22:42:53 +0900 Subject: [PATCH 5/5] Also run from forked repos Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com> --- .github/workflows/storybook-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/storybook-check.yml b/.github/workflows/storybook-check.yml index 8db6a6b62dd92..dd710f9674712 100644 --- a/.github/workflows/storybook-check.yml +++ b/.github/workflows/storybook-check.yml @@ -12,7 +12,7 @@ concurrency: jobs: check: runs-on: ubuntu-latest - if: ${{ github.repository == 'WordPress/gutenberg' }} + if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }} steps: - name: Checkout