Skip to content

Commit

Permalink
๐Ÿ‘ท cicd: cI์—์„œ PR์— ํŠน์ • ๋ผ๋ฒจ ์กด์žฌ์‹œ์— ๋นŒ๋“œ ์Šคํ‚ต #26
Browse files Browse the repository at this point in the history
  • Loading branch information
froggy1014 committed Aug 17, 2024
1 parent 0e4479e commit 49ef582
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ on:
branches:
- develop
paths:
- '**/*.stories.tsx'
- "**/*.stories.tsx"

jobs:
chromatic:
if: github.event.pull_request.labels.*.name != 'skip-build'
name: Run Chromatic Deployment
# Operating System
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
build:
if: github.event.pull_request.labels.*.name != 'skip-build'
uses: ./.github/workflows/_build.yaml
with:
NODE_VERSION: 20.x
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Vercel Preview Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
push:
branches-ignore:
- main

pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]

jobs:
Deploy-Preview:
if: github.event.pull_request.labels.*.name != 'skip-build'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}

0 comments on commit 49ef582

Please sign in to comment.