fix: deploy generates multiple commits #138
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |