Skip to content

Workflow file for this run

name: NPM publish and Storybook deploy
on:
release:
types: [published]
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
permissions:
contents: read
pages: write
id-token: write
jobs:
main:
name: 📦 NPM publish and 📘 Storybook deploy
runs-on: ubuntu-latest
env:
NX_BRANCH: ${{ github.head_ref || github.ref_name }}
steps:
- name: 🛎 Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 🔍 Check GH_TOKEN
uses: ./.github/actions/check-token
with:
GITHUB_TOKEN: $GH_TOKEN
- name: 🛠 Setup Volta
uses: volta-cli/action@v4
- name: 💫 Load and cache dependencies
uses: ./.github/actions/cache-deps
- name: ⏳ Build
run: npm run build
shell: bash
- name: 👀 Check NPM credentials
run: |
echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> .npmrc
npm whoami
- name: 🚀 Publish BEEQ to NPM registry
run: npx nx release publish --parallel=5 --output-style=stream
env:
NPM_CONFIG_PROVENANCE: true
- name: 🚚 Deploy BEEQ Storybook to GitHub Pages
uses: bitovi/[email protected]
with:
build_command: npm run build
checkout: false
install_command: npm ci
path: ./dist/storybook/beeq