Skip to content

점검 페이지 생성 및 app에 적용 #510

점검 페이지 생성 및 app에 적용

점검 페이지 생성 및 app에 적용 #510

name: deploy-chromatic
on:
pull_request:
types: [opened, closed]
branches:
- 'develop'
jobs:
build:
name: deploy-chromatic
if: github.event_name == 'pull_request' && (github.event.action == 'closed' && github.event.pull_request.merged == true) || (github.event.action == 'opened')
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
# node 세팅
- name: Init node
uses: actions/[email protected]
with:
node-version: '18.17.1'
cache: 'yarn'
- name: Set Yarn Version
id: set-version
run: |
yarn set version 4.0.2
echo "YARN_VERSION=$(yarn -v)" >> $GITHUB_OUTPUT
- name: Yarn Cache - PnP
uses: actions/cache@v2
with:
path: |
.yarn/cache
.pnp.*
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ steps.set-version.outputs.YARN_VERSION }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-
- name: Install dependencies
run: yarn install
- name: publish to chromatic
id: chromatic
uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: comment PR
uses: thollander/actions-comment-pull-request@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
message: '🚀storybook: ${{ steps.chromatic.outputs.storybookUrl }}'