Workflow file for this run
This file contains hidden or 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 }} | |
| 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: pnpm build | |
| shell: bash | |
| - name: 👀 Check NPM credentials | |
| run: | | |
| echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> .npmrc | |
| pnpm whoami | |
| - name: 🚀 Publish BEEQ to NPM registry | |
| run: pnpm exec nx release publish --parallel=5 --output-style=stream | |
| env: | |
| NPM_CONFIG_PROVENANCE: true | |
| - name: 🚚 Deploy BEEQ Storybook to GitHub Pages | |
| uses: bitovi/github-actions-storybook-to-github-pages@v1.0.3 | |
| with: | |
| build_command: pnpm build:storybook | |
| checkout: false | |
| install_command: pnpm install --frozen-lockfile | |
| path: ./dist/storybook/beeq |