-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (49 loc) · 1.48 KB
/
deploy-storybook.yaml
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
name: Deploy Storybook.js
on:
push:
branches-ignore:
# Do not run this workflow on Dependabot updates, or else it'll
# absolutely kill our GitHub Action & Chromatic CI minutes.
- dependabot/**
jobs:
deploy-to-chromatic:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
# Required by the Chromatic GitHub Action
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 8.6.2
- name: Setup nodejs
uses: actions/[email protected]
with:
node-version-file: package.json
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build Storybook
run: pnpm build-storybook
- name: Import secrets from Vault
uses: hashicorp/[email protected]
id: secrets
with:
url: https://vault.hackworth-corp.com
path: "github-actions"
role: primer-app-workflow-chromatic
method: jwt
secrets: |
secret/data/chromatic/primer-app token | CHROMATIC_PROJECT_TOKEN ;
- name: Publish to Chromatic
uses: chromaui/action@v1
with:
storybookBuildDir: storybook-static
projectToken: ${{ env.CHROMATIC_PROJECT_TOKEN }}
exitOnceUploaded: true
exitZeroOnChanges: true