Skip to content

Commit cd3b254

Browse files
committed
docs: setup storybook deploy
1 parent 752c9ac commit cd3b254

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

.github/workflows/storybook.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Simple workflow for deploying static content to GitHub Pages
2+
# https://github.com/storybookjs/storybook/discussions/20932#discussioncomment-7332882
3+
4+
name: Deploy to GitHub Pages
5+
6+
on:
7+
# Runs on pushes targeting the default branch
8+
push:
9+
branches: ["dev"]
10+
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
19+
20+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
21+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
22+
concurrency:
23+
group: "pages"
24+
cancel-in-progress: false
25+
26+
jobs:
27+
# Single deploy job since we're just deploying
28+
deploy:
29+
environment:
30+
name: github-pages
31+
url: ${{ steps.deployment.outputs.page_url }}
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
- name: Build storybook
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: "20.19.3"
40+
- run: yarn --frozen-lockfile
41+
- run: yarn build # Build all packages
42+
- run: yarn p:vue storybook:build # Build storybook
43+
- name: Setup Pages
44+
uses: actions/configure-pages@v5
45+
- name: Upload artifact
46+
uses: actions/upload-pages-artifact@v3
47+
with:
48+
path: "./packages/components-vue/storybook-static"
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Shared assets, styles, types, componets & scripts from xamu.
44

5+
Check our [Storybook playground](https://xamu-co.github.io/ui) for more details.
6+
57
## Extras
68

79
Due to an [issue with volar](https://github.com/vuejs/language-tools/issues/5018#issuecomment-2495098549), typescript version is fixed at @5.6.3

0 commit comments

Comments
 (0)