Skip to content

172 front task chore storybook deploy #26

172 front task chore storybook deploy

172 front task chore storybook deploy #26

Workflow file for this run

name: "Chromatic Deployment"
on:
pull_request:
branches:
- develop
# paths:
# - "**.stories.ts"
# - "**.stories.tsx"
# - "**.mdx"
jobs:
chromatic-deployment:
name: Chromatic
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# - name: 캐시 종속성
# id: cache
# uses: actions/cache@v3
# with:
# path: "**/node_modules"
# key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}-storybook
# - name: 종속성 설치
# if: steps.cache.outputs.cache-hit != 'true'
# run: yarn install
- name: Install dependencies
run: yarn
- name: Publish to Chromatic
id: chromatic
uses: chromaui/action@latest
with:
exitZeroOnChanges: true
autoAcceptChanges: true
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.TOKEN }}
- name: 현재 시간 가져오기
uses: josStorer/get-current-time@v2
id: current-time
with:
format: "YYYY년 MM월 DD일 HH시 mm분 ss초"
utcOffset: "+09:00"
# - name: comment PR
# uses: thollander/actions-comment-pull-request@v3
# env:
# GITHUB_TOKEN: ${{ secrets.TOKEN }}
# with:
# message: "storybook: ${{ steps.chromatic.outputs.storybookUrl }}"
outputs:
statis: ${{ job.status }}
storybook_url: ${{ steps.chromatic.outputs.storybookUrl }}
currnent_time: ${{ steps.current-time.outputs.formattedTime }}
github-bot-storybook:
runs-on: ubuntu-latest
needs: [chromatic-deployment]
steps:
- name: PR 코멘트 남기기
uses: thollander/actions-comment-pull-request@v3
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
comment_tag: ${{ github.event.number }}-storybook
message: |
💄 Storybook: ${{ needs.storybook-preview.outputs.storybook_url }}
🕖 Update: ${{ needs.storybook-preview.outputs.currnent_time }}