Skip to content

Commit

Permalink
chore: added concurrency to chromatic deployment and ready_for_review…
Browse files Browse the repository at this point in the history
… to avoid deploying draft prs
  • Loading branch information
hussedev committed Oct 10, 2024
1 parent ca22889 commit d2f9537
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: "Chromatic Deployment"
on:
pull_request:
types: [opened, synchronize]
types: [opened, synchronize, ready_for_review]
branches: [main]
paths:
- "**/*.mdx"
- "**/*.tsx"
- "**/*.ts"

concurrency:
group: ${{ github.ref }} # This ensures that only one workflow runs per branch
cancel-in-progress: true # This cancels any previous runs in the same group

jobs:
chromatic:
name: "Run Chromatic"
Expand Down Expand Up @@ -47,5 +51,5 @@ jobs:
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
diagnostic: true
diagnostics: true
exitZeroOnChanges: true

0 comments on commit d2f9537

Please sign in to comment.