mirror of https://github.com/ghostfolio/ghostfolio
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1011 B
48 lines
1011 B
name: Build and Deploy Storybook
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 20
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build Storybook
|
|
run: npm run build:storybook
|
|
|
|
- name: Upload Storybook Artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: storybook
|
|
path: dist/storybook/ui
|
|
|
|
deploy:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Download built Storybook
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: storybook
|
|
path: dist/storybook/ui
|
|
|
|
- name: Deploy to GitHub Pages
|
|
uses: JamesIves/github-pages-deploy-action@v4
|
|
with:
|
|
branch: gh-pages
|
|
folder: dist/storybook/ui
|
|
|