Storybook deployment by froggy1014 #26
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
# .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 }}" |