-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (45 loc) · 1.42 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
name: Chromatic Storybook
"on":
- pull_request
jobs:
storybook:
name: Build storybook and push to Chromatic
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: "18"
- name: Cache node modules and firebase emulators
uses: actions/cache@v3
with:
path: |
~/.rush
~/.pnpm-store
common/temp
**/node_modules
~/.cache/firebase/emulators
key: ${{ runner.os }}-modules-emulators-node18-v1-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Add rush directory to PATH
run: echo PATH=$PWD/common/scripts/:$PATH >> $GITHUB_ENV
- name: Install and build packages
run: rush update
- name: Build packages
run: rush build
- name: Check if secrets are available
id: has_secret
if: success() || failure()
run: '[ "${{ secrets.CYPRESS_KEY }}" != "" ] && echo HAS_SECRETS=true >> $GITHUB_OUTPUT || echo HAS_SECRETS= >> $GITHUB_OUTPUT'
- name: Publish to Chromatic
uses: chromaui/action@v1
if: steps.has_secret.outputs.HAS_SECRETS
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMAUI_PROJECT_TOKEN }}
workingDir: packages/client
exitZeroOnChanges: true
exitOnceUploaded: true