Skip to content

Commit

Permalink
github pages action
Browse files Browse the repository at this point in the history
  • Loading branch information
bdami-gavant committed Mar 15, 2024
1 parent 8775ff5 commit 6ae497e
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 3 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/deploy-github-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Workflow name
name: Build and Publish Storybook to GitHub Pages

on:
# Event for the workflow to run on
push:
branches:
- 'main'

permissions:
contents: read
pages: write
id-token: write

# List of jobs
jobs:
deploy:
runs-on: ubuntu-latest
# Job steps
steps:
# Manual Checkout
- uses: actions/checkout@v3

# Set up Node
- uses: actions/setup-node@v3
with:
node-version: '18.x'

#👇 Add Storybook build and deploy to GitHub Pages as a step in the workflow
- uses: bitovi/[email protected]
with:
install_command: yarn install
build_command: yarn build-storybook
path: lib/storybook-static
checkout: false
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@ node_modules

# Env
.env
.env.*
.env.*

# builds
lib/storybook-static
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
"author": "Gavant Software, Inc.",
"type": "module",
"scripts": {
"dev": "yarn workspace app dev",
"build": "yarn workspace app build"
"dev": "yarn workspace lib dev",
"build": "yarn workspace lib build",
"lint": "yarn workspace lib lint",
"preview": "yarn workspace lib preview",
"storybook": "yarn workspace lib storybook",
"build-storybook": "yarn workspace lib build-storybook"
},
"devDependencies": {
"prettier": "3.0.2"
Expand Down

0 comments on commit 6ae497e

Please sign in to comment.