-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.35 KB
/
chromatic.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
name: 'react-scatter-graphy storybook deploy and npm publish'
on:
push:
branches:
- deploy
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
repository: rjsduf0503/react-scatter-graphy
token: ${{ secrets.GIT_AUTH_TOKEN }}
- run: yarn
- run: mkdir -p dist
- uses: chromaui/action@v1
id: chromatic
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
- run: |
npm config set '//registry.npmjs.org/:_authToken' ${{ secrets.NPM_AUTH_TOKEN }}
npm config set access public
- run: |
sed -i "s|CHROMATIC_HOMEPAGE|${{ steps.chromatic.outputs.storybookUrl }}|" package.json
- run: yarn publish:npm-outDir
- run: |
sed -i "s|${{ steps.chromatic.outputs.storybookUrl }}|CHROMATIC_HOMEPAGE|" package.json
- run: cp -R build/* dist/
- run: |
git config --global user.name "류건열"
git config --global user.email "rjsduf0503@naver.com"
- run: |
git add dist
git commit -am 'build: automate deploy dist'
git push -f https://${{ secrets.GIT_AUTH_TOKEN }}@github.com/rjsduf0503/react-scatter-graphy.git HEAD:dist-build