-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (34 loc) · 1.08 KB
/
chromatic-pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: 'Chromatic Publish'
on:
pull_request:
types: [labeled, unlabeled, opened, edited, synchronize]
jobs:
build:
if: ${{ github.event.label.name == 'chromatic' }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checking out project
uses: actions/checkout@v2
with:
fetch-depth: 0 # 👈 Required to retrieve git history
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: install
run: npm install --ignore-scripts
- name: Publish to Chromatic
id: chromatic
uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
autoAcceptChanges: true
- name: Comment on PR
uses: thollander/actions-comment-pull-request@v2
with:
message: |
_**🤖 Beep boop, here's your Chromatic url: ${{ steps.chromatic.outputs.storybookUrl }}**_
comment_tag: 🤖 Beep boop