Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Storybook

on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write
Comment on lines +9 to +12

Copilot AI Mar 5, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Workflow-level permissions grants pages: write and id-token: write to the build job, even though only the deploy job needs to publish to Pages. This increases the blast radius if a dependency/script in the build step is compromised. Consider reducing the top-level permissions to the minimum (e.g., contents: read) and setting pages: write + id-token: write only on the deploy job (or even just the single deployment step) via job-level permissions:.

Copilot uses AI. Check for mistakes.

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24'
cache: yarn
cache-dependency-path: frontend/yarn.lock
- run: cd frontend && yarn install --frozen-lockfile
- run: cd frontend && yarn storybook:build
- uses: actions/upload-pages-artifact@v3
with:
path: frontend/storybook-static

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
Loading