Skip to content

Commit

Permalink
chore: add deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmd committed Oct 29, 2024
1 parent 458d9bd commit bf8f587
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/deploy-to-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Node.js v22
uses: actions/setup-node@v4
with:
node-version: '22'

- name: Install dependencies
run: npm install

- name: Build Storybook
run: npm run storybook:build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./storybook-static

deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit bf8f587

Please sign in to comment.