Skip to content

Commit 15137a4

Browse files
committed
ci: fix publish workflow
1 parent 53b0141 commit 15137a4

File tree

1 file changed

+23
-20
lines changed

1 file changed

+23
-20
lines changed

.github/workflows/publish.yml

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,33 @@ on:
88
types: [published]
99

1010
jobs:
11-
publish-storybook:
12-
needs: build
11+
publish:
1312
runs-on: ubuntu-latest
1413
steps:
15-
- uses: actions/checkout@v3
16-
- uses: actions/setup-node@v3
14+
- name: Checkout repository
15+
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Set up Node
20+
uses: actions/setup-node@v3
1721
with:
1822
node-version: lts/*
19-
- run: yarn
20-
- run: yarn deploy-storybook --ci
23+
cache: 'yarn'
24+
25+
- name: Install dependencies
26+
run: yarn install --frozen-lockfile
27+
28+
- name: Build and Deploy Storybook
29+
run: yarn deploy-storybook --ci
2130
env:
2231
GH_TOKEN: ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}
23-
# Uncomment to enable auto publishing to npm
2432

25-
# publish-npm:
26-
# runs-on: ubuntu-latest
27-
# steps:
28-
# - uses: actions/checkout@v3
29-
# - uses: actions/setup-node@v3
30-
# with:
31-
# node-version: lts/*
32-
# registry-url: https://registry.npmjs.org/
33-
# - run: yarn
34-
# - run: yarn build
35-
# - run: npm publish --access public
36-
# env:
37-
# NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
33+
# - name: Build and publish to npm
34+
# if: github.ref == 'refs/tags/v*' # Only run on version tags
35+
# run: |
36+
# yarn build
37+
# npm login --registry=https://registry.npmjs.org/ --scope=your-scope
38+
# npm publish
39+
# env:
40+
# NODE_AUTH_TOKEN: ${{ secrets.YOUR_NPM_AUTH_TOKEN }}

0 commit comments

Comments
 (0)