-
-
Notifications
You must be signed in to change notification settings - Fork 4
70 lines (69 loc) · 2.23 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
name: 'Chromatic'
on:
push:
paths:
- 'packages/ui/**'
workflow_dispatch:
inputs:
sha:
description: The SHA-1 hash referring to the commit to check.
required: true
ref:
description: The head branch associated with the pull request.
required: true
jobs:
chromatic-deployment:
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
DB_DIRECT_URL: ${{ secrets.DB_DIRECT_URL }}
CI: true
OVERRIDE_CI: true
FORCE_COLOR: true
SKIP_ENV_VALIDATION: true
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/ui
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
with:
fetch-depth: 0
- name: Install Node.js
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3
with:
node-version: 18
- uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd # v2.2.4
name: Install pnpm
id: pnpm-install
with:
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: 'echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT'
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
pnpm-store-
# - name: Install dependencies
# run: pnpm install
# 👇 Runs pnpm in ./packages/ui
- name: Install dependencies
run: pnpm install
working-directory: packages/ui
# 👇 Runs Chromatic CLI in ./packages/ui
- name: Publish to Chromatic
uses: chromaui/action@44caff7e88d584b04f79f04e31e819f9a95d4d8f # v1
with:
workingDir: packages/ui
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
# storybookBuildDir: storybook-static/
buildScriptName: sb:build
onlyChanged: true
skip: '@(renovate/**|l10_**)'
exitOnceUploaded: true