Skip to content

docs: deploy storybook to github pages #127

docs: deploy storybook to github pages

docs: deploy storybook to github pages #127

Workflow file for this run

name: Build
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies & build
run: |
npm ci
npm run build
npm run build:github
env:
BUILD_ENV: GHA
# - name: Setup Pages
# uses: actions/configure-pages@v2
# - name: Upload artifact
# uses: actions/upload-pages-artifact@v1
# with:
# path: ./_site
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v1
- uses: bitovi/[email protected]
with:
path: storybook-static # default: dist/storybook
checkout: false # default: true
- name: Deploy Storybook to Chromatic
run: npm run chromatic
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}