-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) Β· 1 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
name: Chromatic Deployment
on:
pull_request:
paths:
- '**.stories.tsx'
permissions:
contents: read
jobs:
chromatic:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: yarn
- uses: chromaui/action@v1
id: chromatic
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
onlyChanged: true
- name: Add Chromatic URL to PR comment
uses: actions/github-script@v6
with:
script: |
const commentBody = `
Storybook URL: ${{ steps.chromatic.outputs.storybookUrl }}
build URL: ${{ steps.chromatic.outputs.buildUrl }}
`;
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: commentBody
})