chore(web, sds): Storybook & Chromatic ์ธํ #14
Workflow file for this run
This file contains 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 Deployment' | |
on: | |
pull_request: | |
branches: [main, develop] | |
paths: | |
- '**.stories.tsx' | |
jobs: | |
chromatic: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 8 | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Cache Dependencies | |
id: cache | |
uses: actions/cache@v3 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}-storybook | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install Dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: pnpm install | |
- name: Publish Project packages/core/sds to Chromatic | |
id: chromatic-sds | |
uses: chromaui/action@latest | |
with: | |
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN_SDS }} | |
workingDir: packages/core/sds | |
onlyChanged: true | |
externals: packages/core/sds/assets/** | |
- name: Publish Project apps/web to Chromatic | |
id: chromatic-web | |
uses: chromaui/action@latest | |
with: | |
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN_WEB }} | |
workingDir: apps/web | |
onlyChanged: true | |
externals: packages/web-domains/assets/** | |
- name: Storybook Deployment PR Comment | |
uses: thollander/actions-comment-pull-request@v1 | |
if: ${{ github.event_name == 'pull_request' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
with: | |
message: '๐ฃ SDS Storybook Delpoyment: ${{ steps.chromatic-sds.outputs.storybookUrl }}\n | |
๐ฃ Web Storybook Delpoyment: ${{ steps.chromatic-web.outputs.storybookUrl }}' |