Skip to content

Storybook deployment by froggy1014 #26

Storybook deployment by froggy1014

Storybook deployment by froggy1014 #26

Workflow file for this run

# .github/workflows/chromatic.yml
name: "Chromatic Deployment"
run-name: Storybook deployment by ${{ github.actor }}
on:
pull_request:
types: [opened, ready_for_review]
branches:
- develop
paths:
- "**/*.stories.tsx"
jobs:
chromatic:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-build') }}
name: Run Chromatic Deployment
# Operating System
runs-on: ubuntu-latest
outputs:
status: ${{ job.status }}
# Job steps
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: false
- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: "pnpm"
cache-dependency-path: "**/pnpm-lock.yaml"
- name: Set up Environment Variable for build
uses: ./.github/workflows/_set_env.yaml
with:
NODE_VERSION: 20.x
NEXT_PUBLIC_STAGE: development
- name: Install dependencies
run: pnpm install
- name: Run Chromatic
id: chromatic
uses: chromaui/action@latest
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
buildScriptName: build-storybook
onlyChanged: true
- name: comment PR
uses: thollander/actions-comment-pull-request@v1
if: ${{ github.event_name == 'pull_request' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
message: "πŸ’… μŠ€ν† λ¦¬λΆ URL ν™•μΈν•˜κΈ° - ${{ steps.chromatic.outputs.storybookUrl }}"