diff --git a/.github/workflows/storybook-check.yml b/.github/workflows/storybook-check.yml new file mode 100644 index 00000000000000..dd710f96747128 --- /dev/null +++ b/.github/workflows/storybook-check.yml @@ -0,0 +1,27 @@ +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: + check: + runs-on: ubuntu-latest + if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }} + + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + 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