-
Notifications
You must be signed in to change notification settings - Fork 1
103 lines (99 loc) · 2.61 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: 'Chromatic'
on: workflow_call
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-chromatic
cancel-in-progress: true
permissions:
actions: write
contents: read
pages: write
id-token: write
jobs:
ui:
name: Build UI Library
environment: 'test'
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/ui
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Typecheck
run: pnpm typecheck
- name: Lint CSS
run: pnpm lint:css
- name: Lint JS
run: pnpm lint:js
- name: build UI library
run: pnpm build
- uses: actions/upload-artifact@v4
with:
name: ui-build
path: packages/ui/dist
chromatic:
name: Chromatic Deploy
runs-on: ubuntu-latest
needs: [ui]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- uses: actions/download-artifact@v4
with:
name: ui-build
path: packages/ui/dist
- name: Run Chromatic
uses: chromaui/action@v1
with:
exitZeroOnChanges: true
exitOnceUploaded: true
onlyChanged: true
skip: "@(renovate/**|dependabot/**)"
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
workingDir: packages/go-ui-storybook
github-pages:
name: Deploy to Github Pages
runs-on: ubuntu-latest
needs: [ui]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- uses: actions/download-artifact@v4
with:
name: ui-build
path: packages/ui/dist
- uses: bitovi/[email protected]
with:
install_command: pnpm install
build_command: pnpm build-storybook
path: packages/go-ui-storybook/storybook-static
checkout: false