Skip to content

Make WidgetLogic.version the source of truth for widget versions (#… #638

Make WidgetLogic.version the source of truth for widget versions (#…

Make WidgetLogic.version the source of truth for widget versions (#… #638

Workflow file for this run

name: Deploy Perseus Storybook to GitHub Pages
on:
push:
branches:
- main
# Allows us to run this workflow manually from the Actions tab
workflow_dispatch:
# This workflow will deploy the Storybook static files to GitHub Pages.
jobs:
build:
name: Build Storybook
runs-on: ${{ vars.USE_GITHUB_RUNNERS == 'true' && 'ubuntu-latest' || 'ephemeral-runner' }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
fetch-depth: 0
- name: Secure Network
uses: Khan/actions@secure-network-v1
timeout-minutes: 5
with:
conf-files: .github/npm-extra-domains.conf
- name: Install & cache node_modules
uses: ./.github/actions/shared-node-cache
with:
node-version: 24.x
- name: Generate API docs
run: pnpm build:docs
- name: Build Storybook
# Generate a static version of storybook inside "storybook-static/"
run: pnpm build:storybook
- name: Upload Storybook artifact
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
with:
# Upload the generated static files
path: "./storybook-static"
deploy:
name: Deploy Storybook to GitHub Pages
needs: build
runs-on: ${{ vars.USE_GITHUB_RUNNERS == 'true' && 'ubuntu-latest' || 'ephemeral-runner' }}
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Setup Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
- run: echo ${{ steps.deployment.outputs.page_url }}