-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.11 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
43
44
45
46
47
name: 'Storybook Publish'
on:
push:
branches:
- 'main'
jobs:
storybook-deployment:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: 'package.json'
cache: 'npm'
- uses: nrwl/nx-set-shas@v4
- name: Install dependencies
run: |
npm ci
- name: Restore nx cache
id: nxcache
uses: actions/cache@v4
with:
path: node_modules/.cache/nx
key: ${{ runner.os }}-nxcache-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-nxcache-
- name: build storybook
run: npx nx run sketch:build-storybook
- name: Publish to Chromatic
# see https://github.com/chromaui/action/tags for versions
uses: chromaui/[email protected]
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
storybookBuildDir: ./dist/storybook/sketch