[Refactor] SSE 훅을 Provider로 통합, unReadCount 전역상태에서 제거 #992
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Chromatic | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| issues: write | |
| jobs: | |
| chromatic: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Create initial Report | |
| if: github.event_name == 'pull_request' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const script = require('./.github/scripts/chromatic-initial-comment.cjs'); | |
| await script({ github, context }); | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Publish to Chromatic | |
| id: chromatic | |
| uses: chromaui/action@latest | |
| with: | |
| projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
| autoAcceptChanges: main | |
| exitZeroOnChanges: true | |
| onlyChanged: true | |
| continue-on-error: true | |
| - name: Create Storybook report | |
| if: always() && github.event_name == 'pull_request' | |
| uses: actions/github-script@v7 | |
| env: | |
| CHANGE_COUNT: ${{ steps.chromatic.outputs.changeCount }} | |
| BUILD_STATUS: ${{ steps.chromatic.outcome }} | |
| STORYBOOK_URL: ${{ steps.chromatic.outputs.storybookUrl }} | |
| BUILD_URL: ${{ steps.chromatic.outputs.buildUrl }} | |
| with: | |
| script: | | |
| const script = require('./.github/scripts/chromatic-comment.cjs'); | |
| await script({ github, context, core }); | |
| - name: Fail if build failed | |
| if: steps.chromatic.outcome == 'failure' | |
| run: | | |
| echo "::error::Storybook build failed! Please check the logs." | |
| exit 1 |