Skip to content

Commit 590ec3b

Browse files
committed
Update check-if-ui-has-changed.yml
1 parent 53befd7 commit 590ec3b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/check-if-ui-has-changed.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@
44
name: 'Chromatic'
55

66
# Event for the workflow
7-
on: push
7+
on:
8+
pull_request_target: # So we can test on forks
9+
branches:
10+
- main
11+
paths:
12+
- apps/storybook/**
13+
- packages/ui/**
14+
workflow_dispatch:
815

916
# List of jobs
1017
jobs:
@@ -38,7 +45,8 @@ jobs:
3845
- name: Checkout repository
3946
uses: actions/checkout@v2
4047
with:
41-
fetch-depth: 0 # 👈 Required to retrieve git history
48+
ref: ${{ github.event.pull_request.head.sha }} # So we can test on forks
49+
fetch-depth: 2
4250
- name: Install dependencies
4351
run: yarn
4452
# 👇 Adds Chromatic as a step in the workflow

0 commit comments

Comments
 (0)