mirror of https://github.com/ghostfolio/ghostfolio
1 changed files with 48 additions and 0 deletions
@ -0,0 +1,48 @@ |
|||
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 |
Loading…
Reference in new issue