build: deploy test #86
Workflow file for this run
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-test | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
ref: ${{ github.head_ref }} | |
push: true | |
- 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 tsc-build:outDir | |
- run: mkdir -p dist | |
- run: yarn tsc-build:outDir | |
# - run: cp -R dist/* dist/ | |
# - uses: actions/upload-artifact@v2 | |
# with: | |
# name: temp-dist | |
# path: temp-dist/ | |
# - run: rsync -r temp-dist/* dist/ | |
# - run: rsync -r temp-dist/* $GITHUB_WORKSPACE/dist/ | |
- uses: actions/checkout@v2 | |
with: | |
repository: rjsduf0503/react-scatter-graphy | |
token: ${{ secrets.GIT_AUTH_TOKEN }} | |
ref: deploy-test | |
- run: ls | |
- run: ls dist/ | |
# - run: ls temp-dist/ | |
# - run: | | |
# cd $GITHUB_WORKSPACE/ | |
# git config --global user.name "류건열" | |
# git config --global user.email "rjsduf0503@naver.com" | |
# git add . | |
# git commit -m "Deploy to deploy-test" | |
# git push | |
- name: Push to GitHub repository | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GIT_AUTH_TOKEN }} | |
directory: dist/ | |
branch: deploy-test |