2021-09-07 14:00:44 +02:00
|
|
|
name: 'Storybook Chromatic'
|
2021-08-27 09:43:15 +02:00
|
|
|
|
2021-10-14 20:03:47 +02:00
|
|
|
on: pull_request
|
2021-08-27 09:43:15 +02:00
|
|
|
|
|
|
|
jobs:
|
2021-09-07 14:00:44 +02:00
|
|
|
storybook-chromatic:
|
2021-08-27 09:43:15 +02:00
|
|
|
runs-on: ubuntu-latest
|
2021-11-02 16:52:31 +01:00
|
|
|
if: github.event.pull_request.head.repo.full_name == github.repository
|
2021-08-27 09:43:15 +02:00
|
|
|
steps:
|
2021-11-02 16:52:31 +01:00
|
|
|
- uses: actions/checkout@v2
|
2021-11-03 12:41:37 +01:00
|
|
|
with:
|
|
|
|
fetch-depth: 0 # 👈 Required to retrieve git history (https://www.chromatic.com/docs/github-actions)
|
2021-10-14 20:03:47 +02:00
|
|
|
|
2021-08-27 09:43:15 +02:00
|
|
|
- name: Install dependencies and chromatic
|
|
|
|
run: yarn add --dev chromatic
|
2021-10-14 20:03:47 +02:00
|
|
|
|
2021-08-27 09:43:15 +02:00
|
|
|
- name: Publish to Chromatic
|
|
|
|
uses: chromaui/action@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# 👇 Chromatic projectToken, refer to the manage page to obtain it.
|
|
|
|
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|