From 37419d6f646f5d4f54f674ad46e8517747df16fb Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sat, 12 Oct 2024 20:52:47 -0400 Subject: [PATCH] Fix Chromatic on PR --- .github/workflows/chromatic.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index 50b70e64..c1f2e9ee 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -1,10 +1,14 @@ name: "Chromatic" on: - push: - branches: - - next - - graphql + push: + branches: + - next + - graphql + pull_request: + branches: + - next + - graphql jobs: chromatic: @@ -15,10 +19,18 @@ jobs: node-version: [20.x] steps: - name: Checkout + if: github.event_name == 'push' uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Checkout (PR) + if: github.event_name != 'push' + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.ref }} + - name: Restore Yarn cache uses: actions/cache@v4 with: