Skip to content

gs0428의 Primitive UI 스토리북 배포 #54

gs0428의 Primitive UI 스토리북 배포

gs0428의 Primitive UI 스토리북 배포 #54

name: Primitive UI 스토리북 배포
run-name: ${{ github.actor }}의 Primitive UI 스토리북 배포
on:
pull_request:
branches:
- develop
paths:
- "packages/primitive/components/**/*"
permissions:
contents: read
pull-requests: write
jobs:
storybook:
runs-on: ubuntu-latest
steps:
- name: 레포지토리 체크아웃
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Node.js 설정
uses: actions/setup-node@v4
with:
node-version: 20
- name: pnpm 8.15.6 설치
uses: pnpm/action-setup@v2
with:
version: 8.15.6
- name: 의존성 설치
run: pnpm install --no-frozen-lockfile
- name: Check if token exists
run: |
if [ -n "${{ secrets.PRIMITIVE_UI_CHROMATIC_TOKEN }}" ]; then
echo "PRIMITIVE_UI_CHROMATIC_TOKEN is set"
else
echo "PRIMITIVE_UI_CHROMATIC_TOKEN is not set"
fi
- name: chromatic에 배포
id: publish_chromatic
uses: chromaui/action@latest
with:
projectToken: ${{ secrets.PRIMITIVE_UI_CHROMATIC_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
workingDir: packages/primitive
- name: chromatic 배포 URL 댓글 작성
uses: thollander/actions-comment-pull-request@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
message: "🐱 스토리북이 배포되었습니다: ${{ steps.publish_chromatic.outputs.url }} 🐱"