-
Notifications
You must be signed in to change notification settings - Fork 85
50 lines (42 loc) · 1.25 KB
/
deploy-storybook.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
name: Deploy Storybook
on:
push:
tags:
- '[1-9].*'
workflow_dispatch:
jobs:
deploy-storybook:
runs-on: ubuntu-latest
name: Deploy Storybook
environment:
name: github-pages
url: ${{ steps.build-publish.outputs.page_url }}
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up node
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install
- name: Build Storybook
run: yarn build-storybook
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
clean: true
clean-exclude: |
CNAME
folder: storybook-static # The folder the action should deploy.