Skip to content

Instantly share code, notes, and snippets.

@alpavlove
Created July 21, 2022 08:30
Show Gist options
  • Save alpavlove/45f5cb1566204600eb3d9f471c492f01 to your computer and use it in GitHub Desktop.
Save alpavlove/45f5cb1566204600eb3d9f471c492f01 to your computer and use it in GitHub Desktop.
Deploy storybook to Github Pages workflow
name: Storybook
on:
push:
paths: ["stories/**", "src/**"]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/[email protected]
with:
persist-credentials: false
- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1
- name: Install and Build 🔧
run:
npm run build-storybook
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: storybook-static
CLEAN: true
TARGET_FOLDER: docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment