Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: NPM publish and Storybook deploy | |
on: | |
release: | |
types: [published] | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_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: ${{ secrets.GITHUB_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=${{ secrets.NPM_TOKEN }}" >> .npmrc | |
npm whoami | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: 🚀 Publish BEEQ to NPM registry | |
run: npx nx run-many -t publish -p tag:publishable --parallel=1 --output-style=stream-without-prefixes | |
- 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 |