-
Notifications
You must be signed in to change notification settings - Fork 15
42 lines (36 loc) · 1 KB
/
storybook.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
name: Build and Deploy Storybook to Chromatic
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Dependencies
run: npm install
working-directory: ./ui
- name: Build Storybook
run: npm run build-storybook
working-directory: ./ui
- name: Publish to Chromatic
id: chromatic
uses: chromaui/action@v11
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: chpt_0314d7b0d66ad0c
storybookBuildDir: "storybook-static"
workingDir: "./ui"
exitOnceUploaded: true
- name: Test the deployed Storybook
run: |
npx playwright install
npm run test-storybook -- --no-index-json --url ${{ steps.chromatic.outputs.storybookUrl }}
working-directory: ./ui