-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (39 loc) · 1.38 KB
/
chromatic.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
39
40
41
42
43
44
name: Chromatic
on:
pull_request:
types: [opened, synchronize]
push:
branches:
- main
jobs:
check-commit-message:
runs-on: ubuntu-latest
outputs:
message: ${{ steps.get_commit_message.outputs.message }}
steps:
- name: Get repo
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Get commit message
id: get_commit_message
run: echo "message=$(git show -s --format=%s)" >> "$GITHUB_OUTPUT"
chromatic-build:
needs: check-commit-message
if: ${{ github.event.action != 'synchronize' || contains(needs.check-commit-message.outputs.message, 'chromatic-build') }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: npm ci
working-directory: ./packages/vlossom
- name: Publish to Chromatic
uses: chromaui/action@latest
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
autoAcceptChanges: main
workingDir: ./packages/vlossom
buildScriptName: build-storybook:chromatic