Skip to content

Commit 5a67d02

Browse files
feat(WUC): Deploy Storybook (#28)
* feat: addition auto deploy for storybook * refactor: fix names in ci.yml for deploy storybook
1 parent 377f9c5 commit 5a67d02

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/ci.yml

+35
Original file line numberDiff line numberDiff line change
@@ -174,3 +174,38 @@ jobs:
174174
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
175175
GH_TOKEN: ${{ secrets.GH_TOKEN }}
176176
run: npx semantic-release
177+
178+
deploy-storybook:
179+
name: Update storybook
180+
needs: [test-lint, test-build, pre_ci]
181+
timeout-minutes: 5
182+
if: ${{ github.ref == 'refs/heads/master' }}
183+
184+
runs-on: ubuntu-latest
185+
186+
steps:
187+
- uses: actions/checkout@v2
188+
- uses: actions/setup-node@v1
189+
with:
190+
node-version: 16
191+
192+
- name: Manage cache
193+
uses: actions/[email protected]
194+
with:
195+
path: |
196+
./node_modules
197+
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('.github/workflows/*.yml') }}
198+
restore-keys: |
199+
${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
200+
${{ runner.OS }}-build
201+
202+
- name: Prepare token
203+
run: echo "//npm.pkg.github.com/:_authToken=${GH_TOKEN}" >> .npmrc
204+
env:
205+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
206+
207+
- name: Build storybook
208+
run: npm run build-storybook
209+
210+
- name: Deploy storybook
211+
run: npm run deploy-storybook

0 commit comments

Comments
 (0)