Skip to content

Commit

Permalink
Updated github action to deploy to github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
dgibson666 committed Apr 10, 2024
1 parent feb8989 commit 5e21644
Showing 1 changed file with 58 additions and 6 deletions.
64 changes: 58 additions & 6 deletions .github/workflows/publish-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,69 @@
name: Deploy Github Pages
run-name: ${{ github.actor }} is deploying the design system to Github Pages
on:
workflow_dispatch:
# Workflow name
name: Build and Publish Storybook to GitHub Pages
run-name: ${{ github.actor }} is deploying the CBP Design System documentation packages to Github Pages

# Event for the workflow to run on
on:
push:
tags:
- '*'
branches:
- 'develop'

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
contents: read
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# 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/github-actions-storybook-to-github-pages@v1.0.1
with:
install_command: npm ci # default: npm ci
build_command: npm run build-pages # default: npm run build-storybook
path: .public # default: dist/storybook
checkout: false # default: true






























jobs:
build:
Expand Down

0 comments on commit 5e21644

Please sign in to comment.