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
26 changes: 19 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
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
packages: write
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
Expand All @@ -31,14 +34,23 @@ jobs:
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
id: deployment
uses: actions/upload-pages-artifact@v4
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