Skip to content

Publish Update

Publish Update #10

Workflow file for this run

name: Publish Update
on:
release:
types:
- created
workflow_dispatch:
jobs:
storybook:
name: Update Storybook
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
strategy:
matrix:
os: [ubuntu-latest]
bun: [1.0.x]
runs-on: ${{ matrix.os }}
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- name: Set up Bun
id: setup
uses: oven-sh/setup-bun@v1
with:
bun-version: ${{ matrix.bun }}
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Install Dependencies
run: bun i
- name: Build Resources
run: bun run build-storybook
- name: Upload Static Artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'storybook/'
- name: Deploy Storybook to Github Pages
id: deploy
uses: actions/deploy-pages@v2
package:
name: Publish to NPM
if: ${{ github.event_name == 'release' }}
strategy:
matrix:
os: [ubuntu-latest]
node: [16]
packager: [npm]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Node
id: setup
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: ${{ matrix.packager }}
- name: Install Dependencies
run: npm ci
- name: Build Resources
run: npm run build
- name: Publish to NPM
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
- name: Upload Package Artifact
uses: actions/upload-artifact@v3
with:
name: build
path: './dist/'