-
Notifications
You must be signed in to change notification settings - Fork 55
40 lines (37 loc) · 1.11 KB
/
npm-storybook-release.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
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: components
on:
push:
branches:
- master
jobs:
semantic-release:
name: semantic-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
- run: npm install
- run: npx npm-install-peers
- run: npm run build
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Build Storybook
run: |
rm -rf docs/storybook
npm run storybook:build
- name: Push Storybook updates to Github
run: |
# Check if there's anything to commit
if [ -n "$(git status --porcelain)" ]; then
git pull
git add docs/storybook
git commit -m "docs: build Storybook [skip ci]"
git push origin master
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}