-
Notifications
You must be signed in to change notification settings - Fork 14
59 lines (48 loc) · 1.53 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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