-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (38 loc) · 1.2 KB
/
deploy-storybook-ghpages.yaml
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
name: Build and Deploy Storybook
on:
push:
branches:
- develop
jobs:
build-and-deploy:
name: Build and Deploy Storybook to GitHub Pages
runs-on: ubuntu-latest
permissions:
# Grant write access to id-token (required by actions/deploy-pages)
id-token: write
contents: read # Ensure read access to contents for deploying
pages: write # Ensure write access to GitHub Pages
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Install dependencies
working-directory: frontend
run: |
yarn install
- name: Build Storybook
working-directory: frontend
run: |
yarn build-storybook # This builds the static files for Storybook
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
path: frontend/storybook-static # Path to the generated Storybook static folder
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4