From ac35e2c4a72a6ab738ace622efbad0cb21fb7828 Mon Sep 17 00:00:00 2001 From: Rick Smith Date: Wed, 15 Oct 2025 13:50:12 +0100 Subject: [PATCH 1/5] updated master to main in piepline --- .github/workflows/storybook.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml index 8025a08..374b1bc 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/storybook.yml @@ -3,7 +3,8 @@ name: Build & Deploy Storybook on: push: branches: - - master + - main + workflow_dispatch: jobs: build-and-deploy: From 4519e7c57c25f5d8e6afe620f4faf78dd30876b7 Mon Sep 17 00:00:00 2001 From: Rick Smith Date: Wed, 15 Oct 2025 13:55:21 +0100 Subject: [PATCH 2/5] Fix Storybook deployment authentication MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added permissions.contents.write to allow pushing to gh-pages branch - Updated to use GITHUB_TOKEN instead of ACCESS_TOKEN for proper authentication - Configured checkout action to use the token 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/storybook.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml index 374b1bc..27a69b6 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/storybook.yml @@ -9,8 +9,12 @@ on: jobs: build-and-deploy: runs-on: ubuntu-latest + permissions: + contents: write steps: - uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} - name: Setup Node.js uses: actions/setup-node@v4 with: @@ -22,4 +26,4 @@ jobs: - name: Deploy Storybook run: yarn storybook-to-ghpages --ci env: - GH_TOKEN: ${{ secrets.ACCESS_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 7714ee60fd8f818259f2f97823ab9cd55f6d1b1b Mon Sep 17 00:00:00 2001 From: Rick Smith Date: Wed, 15 Oct 2025 14:15:38 +0100 Subject: [PATCH 3/5] Replace storybook-deployer with GitHub Pages deployment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replaced old storybook-deployer package with modern GitHub Actions deployment - Uses official actions/deploy-pages@v4 for deployment - No authentication issues with tokens - Deploys to GitHub Pages using artifacts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/storybook.yml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml index 27a69b6..c59b349 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/storybook.yml @@ -10,11 +10,14 @@ jobs: build-and-deploy: runs-on: ubuntu-latest permissions: - contents: write + contents: read + pages: write + id-token: write + concurrency: + group: "pages" + cancel-in-progress: false steps: - uses: actions/checkout@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - name: Setup Node.js uses: actions/setup-node@v4 with: @@ -23,7 +26,14 @@ jobs: run: corepack enable - name: Install dependencies run: yarn install - - name: Deploy Storybook - run: yarn storybook-to-ghpages --ci - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Build Storybook + run: yarn build-storybook + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./storybook-static + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From cf930a53896d54f9d31a19f984dc3dc86f174db9 Mon Sep 17 00:00:00 2001 From: Rick Smith Date: Wed, 15 Oct 2025 14:23:10 +0100 Subject: [PATCH 4/5] Use peaceiris/actions-gh-pages for Storybook deployment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replaced with peaceiris/actions-gh-pages@v4 action - Deploys to gh-pages branch without needing admin Pages settings - Handles GITHUB_TOKEN authentication properly - Works without repository settings access 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/storybook.yml | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml index c59b349..4d84745 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/storybook.yml @@ -10,12 +10,7 @@ jobs: build-and-deploy: runs-on: ubuntu-latest permissions: - contents: read - pages: write - id-token: write - concurrency: - group: "pages" - cancel-in-progress: false + contents: write steps: - uses: actions/checkout@v4 - name: Setup Node.js @@ -28,12 +23,9 @@ jobs: run: yarn install - name: Build Storybook run: yarn build-storybook - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: ./storybook-static - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./storybook-static + publish_branch: gh-pages From 343558216e51c8543bbff0ffc99ae06ace98233c Mon Sep 17 00:00:00 2001 From: Rick Smith Date: Wed, 15 Oct 2025 14:29:12 +0100 Subject: [PATCH 5/5] Use full commit SHA for peaceiris/actions-gh-pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Updated to use commit SHA instead of version tag for security - Prevents potential supply chain attacks - Follows GitHub Actions security best practices 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/storybook.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml index 071c4f4..647824a 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/storybook.yml @@ -26,7 +26,7 @@ jobs: - name: Build Storybook run: yarn build-storybook - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v4 + uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./storybook-static