-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.09 KB
/
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
name: Storybook
on:
push:
branches: ["main"]
pull_request:
types: [opened, synchronize]
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- uses: actions/checkout@v4
- name: Cache turbo build setup
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
# Setup pnpm
- uses: pnpm/action-setup@v3
with:
version: 8
# Install dependencies
- name: Install Dependencies
run: pnpm install
# Build Storybook
- name: Build Storybook
run: pnpm run build-storybook
# Deploy to GitHub Pages (only on push to main)
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist-storybook
# Optionally specify the branch
# publish_branch: gh-pages