Skip to content

[#205] Refactor:게시글 작성 페이지 수정 (#217) #390

[#205] Refactor:게시글 작성 페이지 수정 (#217)

[#205] Refactor:게시글 작성 페이지 수정 (#217) #390

Workflow file for this run

name: 'Publish Storybook to Chromatic'
on:
push:
branches: main
pull_request:
branches: main
jobs:
publish-storybook-to-chromatic:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# setup-node의 pnpm 지원을 위한 Action
- uses: pnpm/action-setup@v4
with:
version: 8.15.1
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
- run: pnpm install
- uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
exitZeroOnChanges: true
env:
STORYBOOK_API_BASE_URL: ${{ vars.STORYBOOK_API_BASE_URL }}
id: chromatic
- uses: actions/github-script@v7
if: github.event_name == 'pull_request'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const url = `${{ steps.chromatic.outputs.storybookUrl }}`;
const message = `🚀 Storybook is deployed! View it here: ${url}`;
const prNumber = context.payload.pull_request.number;
github.rest.issues.createComment({
...context.repo,
issue_number: prNumber,
body: message
});