-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1.26 KB
/
deploy.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
name: Main
on:
push:
branches: [main]
jobs:
test-build-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # 👈 Chromatic: Required to retrieve git history
- uses: c-hive/gha-yarn-cache@v1
- uses: actions/setup-node@v1
with:
node-version: '14'
- name: Install dependencies
run: yarn
- name: Run unit-tests
run: yarn test
- name: Build storybook
run: yarn build-storybook
- name: Deploy Storybook 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: docs # The branch the action should deploy to.
folder: storybook-static # The folder that the build-storybook script generates files.
clean: true # Automatically remove deleted files from the deploy branch
- name: Publish storybook to Chromatic
uses: chromaui/action@v1
# Chromatic GitHub Action options
with:
token: ${{ secrets.GITHUB_TOKEN }}
# 👇 Chromatic projectToken, refer to the manage page to obtain it.
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
storybookBuildDir: storybook-static