Skip to content

fix: deploy action

fix: deploy action #10

name: Deploy Storybook
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js and Dependencies
uses: ./.github/actions/setup-node-dependencies
- name: Run tests
run: pnpm test
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js and Dependencies
uses: ./.github/actions/setup-node-dependencies
- name: Build Storybook
run: pnpm run build-storybook
- name: Upload Storybook build
uses: actions/upload-artifact@v3
with:
name: storybook-build
path: storybook-static
deploy:
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: storybook-build
path: ./storybook-static
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
artifact_name: storybook-build