-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.28 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
51
52
# Deplay storybook for example
name: Deploy storybook
on:
pull_request:
paths:
- 'apps/react/**'
- '.github/workflows/deploy-storybook.yml'
push:
branches:
- main
paths:
- 'apps/react/**'
- '.github/workflows/deploy-storybook.yml'
jobs:
deploy-storybook:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
node-version: 20
- uses: pnpm/[email protected]
with:
version: 9.1.0
- uses: actions/[email protected]
id: pnpm-cache
with:
path: |
**/node_modules
key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- if: steps.pnpm-cache.outputs.cache-hit != 'true'
id: install
run: pnpm install && echo "::set-output name=installed::true"
- if: steps.install.outputs.installed != 'true'
run: pnpm install
- run: pnpm build-storybook
- name: Deploy to GitHub Pages
if: github.event_name != 'pull_request'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./apps/react/storybook-static