-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (37 loc) · 1.17 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
name: "Chromatic"
on: push
jobs:
deployment:
runs-on: ubuntu-latest
if: ${{ github.triggering_actor != 'dependabot[bot]' }}
steps:
- uses: actions/checkout@v1
- name: Use Node.js v16
uses: actions/setup-node@v3
with:
node-version: "16.x"
- name: Install dependencies
run: npm i
- name: Build tokens
run: npm run build:tokens
- name: Build icons
run: npm run build:icons
- name: Publish to Chromatic
id: chromatic
uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
buildScriptName: "build:storybook"
- name: Generate Storybook preview
uses: actions/github-script@v6
with:
script: |
await github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: context.sha,
state: "success",
target_url: "${{ steps.chromatic.outputs.storybookUrl }}",
description: "Storybook preview generated!",
context: "Chromatic / storybook (push)"
});