Skip to content

Commit

Permalink
πŸ‘· cicd: chromatic μžλ™ 배포 μ›Œν¬ν”Œλ‘œμš° μΆ”κ°€ #9
Browse files Browse the repository at this point in the history
  • Loading branch information
froggy1014 committed Jul 30, 2024
1 parent 7e3a5d5 commit 2f0c826
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNER
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @froggy1014
8 changes: 3 additions & 5 deletions .github/workflows/_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ jobs:
with:
node-version: ${{ inputs.NODE_VERSION }}
cache: "pnpm"
cache-dependency-path: '**/pnpm-lock.yaml'
cache-dependency-path: "**/pnpm-lock.yaml"

- name: Install dependencies
run: |
pnpm install
run: pnpm install
- name: build
run: |
pnpm run build
run: pnpm run build
57 changes: 57 additions & 0 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# .github/workflows/chromatic.yml
name: "Chromatic Deployment"
run-name: Storybook deployment by ${{ github.actor }}

on:
pull_request:
branches:
- develop
paths:
- "**.stories.tsx"

jobs:
chromatic:
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: 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: "πŸ’… ## storybook-URL - ${{ steps.chromatic.outputs.storybookUrl }}"

0 comments on commit 2f0c826

Please sign in to comment.