From 6ef95405593b267b0f0fe0c6e16cdf58e97291ac Mon Sep 17 00:00:00 2001 From: Aidan <104831665+aidanCQ@users.noreply.github.com> Date: Wed, 24 Sep 2025 10:42:01 +0100 Subject: [PATCH 1/5] ci: publish storybook static. --- .github/workflows/release.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d803bdd..06a9096 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,3 +29,13 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Upload static files as artifact + id: storybook_static + uses: actions/upload-pages-artifact@v4 # or specific "vX.X.X" version tag for this action + with: + path: storybook-static/ + + - name: Publish storybook build to github pages + id: storybook_static + uses: actions/deploy-pages@v4 From 6c8354258ec28913d5058ddced18ff89e55d6c41 Mon Sep 17 00:00:00 2001 From: Aidan <104831665+aidanCQ@users.noreply.github.com> Date: Wed, 24 Sep 2025 10:42:13 +0100 Subject: [PATCH 2/5] Remove comment. --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 06a9096..476400f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,7 @@ jobs: - name: Upload static files as artifact id: storybook_static - uses: actions/upload-pages-artifact@v4 # or specific "vX.X.X" version tag for this action + uses: actions/upload-pages-artifact@v4 with: path: storybook-static/ From 0661a6d3ec246eb0ccee44d213417c6099e16cd1 Mon Sep 17 00:00:00 2001 From: Aidan <104831665+aidanCQ@users.noreply.github.com> Date: Wed, 24 Sep 2025 12:03:55 +0100 Subject: [PATCH 3/5] fix: workflow. --- .github/workflows/release.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 476400f..ad4f7cc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,17 +25,19 @@ jobs: - run: npm run lint - run: npm run build + - run: npx semantic-release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Build storybook site + - run: npm run build-storybook + - name: Upload static files as artifact - id: storybook_static uses: actions/upload-pages-artifact@v4 with: path: storybook-static/ - name: Publish storybook build to github pages - id: storybook_static uses: actions/deploy-pages@v4 From b9ec10fab3b26623c602c9c910693cee5af89a4b Mon Sep 17 00:00:00 2001 From: Aidan <104831665+aidanCQ@users.noreply.github.com> Date: Wed, 24 Sep 2025 17:22:01 +0100 Subject: [PATCH 4/5] fix --- .github/workflows/release.yml | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 444f865..6956973 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,10 +1,11 @@ -name: Release library +name: Release Lib & Deploy Storybook Site on: push: branches: - main # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages + permissions: contents: write pages: write @@ -12,33 +13,43 @@ permissions: id-token: write jobs: - release: + release-lib: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 20 - cache: 'npm' + node-version: 20 + cache: 'npm' + - run: npm ci - run: npm run lint - run: npm run build - - run: npx semantic-release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Build storybook site - - run: npm run build-storybook + id: build + run: npm run build-storybook - name: Upload static files as artifact - uses: actions/upload-pages-artifact@v4 + id: deployment + uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action with: path: storybook-static/ - - name: Publish storybook build to github pages + deploy-site: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment uses: actions/deploy-pages@v4 From 5539cc269eeb2cd4508b799bc55fb62027e53a44 Mon Sep 17 00:00:00 2001 From: Aidan <104831665+aidanCQ@users.noreply.github.com> Date: Wed, 24 Sep 2025 17:22:12 +0100 Subject: [PATCH 5/5] Remove comment. --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6956973..ff18b61 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,7 +39,7 @@ jobs: - name: Upload static files as artifact id: deployment - uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action + uses: actions/upload-pages-artifact@v4 with: path: storybook-static/