fix: deploy action #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |