Skip to content

Merge pull request #956 from DTS-STN/release #39

Merge pull request #956 from DTS-STN/release

Merge pull request #956 from DTS-STN/release #39

Workflow file for this run

name: Build Storybook & NPM Publish
on:
push:
branches:
- main
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Node
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- name: Install
run: npm ci
- name: Publish the package
run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN_DTSSTN_LOCAL }}
build-storybook:
runs-on: ubuntu-latest
needs: publish-npm
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Node
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- name: Install
run: npm ci
- name: Build Storybook
run: npm run build-storybook
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
target-folder: main
branch: gh-pages
folder: storybook-static
clean: true