-
Notifications
You must be signed in to change notification settings - Fork 10
46 lines (39 loc) · 1.23 KB
/
preview-stroybook.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
name: preview-storybook
on:
pull_request:
paths-ignore:
- 'firebase/**'
branches:
- 'main'
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache node_modules
id: node_modules_cache_id
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ matrix.os }}-node-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
- name: Install
if: steps.node_modules_cache_id.outputs.cache-hit != 'true'
run: yarn --check-files --frozen-lockfile --non-interactive
- name: Build
run: yarn build-storybook
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_BLOROGUE }}'
expires: 1d
projectId: blorogue
target: storybook
- name: Publish to Chromatic
uses: chromaui/action@v1
with:
exitOnceUploaded: true
allowConsoleErrors: true
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}