forked from netless-io/flat
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.44 KB
/
Copy pathdeploy-storybook.yml
File metadata and controls
52 lines (44 loc) · 1.44 KB
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
name: Storybook
on:
push:
branches:
- "main"
paths:
- "packages/flat-components/src/**"
jobs:
deploy-storybook:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install NodeJS
uses: actions/setup-node@v2
with:
node-version: "12.18.2"
- uses: actions/cache@v2
id: yarn-cache
with:
key: yarn-storybook-v1-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
path: |
./node_modules
./packages/**/node_modules
- name: Install dependencies
run: |-
if node ./scripts/ci/install-changed-package-dependencies.js; then
# failure automatically retries 3 times
yarn run bootstrap || yarn run bootstrap || yarn run bootstrap
fi
env:
components: true
if: steps.yarn-cache.outputs.cache-hit != 'true'
- name: Build Types
# it must be added here, otherwise when the cache matches, there will be flat-types not found
run: yarn workspace flat-types build
if: steps.yarn-cache.outputs.cache-hit == 'true'
- name: Build Storybook
run: yarn workspace flat-components build
- name: Deploy Storybook
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./packages/flat-components/storybook-static