Skip to content

[Feat/#207] Tab 인터랙션 구현 #235

[Feat/#207] Tab 인터랙션 구현

[Feat/#207] Tab 인터랙션 구현 #235

Workflow file for this run

name: 'Storybook Deployment'
on:
pull_request:
branches:
- develop
permissions:
contents: write
pull-requests: write
jobs:
storybook:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache Dependencies
id: cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}-storybook
restore-keys: |
${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}-storybook
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
- name: Publish to Chromatic
id: chromatic
uses: chromaui/action@v10
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
onlyChanged: true
autoAcceptChanges: true
flags: '--allow-console-errors'
- name: Check for Storybook file changes
id: check_changes
run: |
echo "기준(base) 커밋: ${{ github.event.pull_request.base.sha }}"
echo "현재(head) 커밋: ${{ github.event.pull_request.head.sha }}"
# base와 head 커밋 사이의 변경된 파일 목록에서 원하는 디렉토리의 파일이 있는지 확인
if git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep -E '(^\.storybook/|^src/stories/)'; then
echo "changed=true" >> $GITHUB_OUTPUT
else
echo "changed=false" >> $GITHUB_OUTPUT
fi
- name: Comment PR
if: github.event_name == 'pull_request' && steps.check_changes.outputs.changed == 'true'
uses: thollander/actions-comment-pull-request@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
message: '🍰 Storybook 배포가 완료되었습니다! 🔗 ${{ steps.chromatic.outputs.storybookUrl }}'