Skip to content

Commit

Permalink
update GitHub Actions workflow for deploying to GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmars committed Feb 10, 2025
1 parent 76c3f9a commit b222342
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions .github/workflows/deploy-github-pages.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,38 @@
# Workflow name
name: Build and Publish Storybook to GitHub Pages
# Simple workflow for deploying static content to GitHub Pages
name: Deploy to GitHub Pages

on:
# Event for the workflow to run on
# Runs on pushes targeting the default branch
push:
branches:
- master
branches: ['master']

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# List of jobs
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
# Job steps
steps:
- id: build-publish
uses: bitovi/[email protected]
- name: Checkout
uses: actions/checkout@v4
- run: npm ci
- run: npm run build-storybook
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: './storybook-static'
- id: deploy
name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
with:
path: storybook-static
token: ${{ github.token }}

0 comments on commit b222342

Please sign in to comment.