diff --git a/.github/workflows/storybook-chromatic.yml b/.github/workflows/storybook-chromatic.yml index 7a52e5d15..cd1711d7a 100644 --- a/.github/workflows/storybook-chromatic.yml +++ b/.github/workflows/storybook-chromatic.yml @@ -1,6 +1,13 @@ name: QA -on: [pull_request] +on: + push: + branches-ignore: + # Matches release branches + - "[0-9]+.[0-9]+" + tags-ignore: + # Matches release tags + - "*" jobs: chromatic-storybook: @@ -30,6 +37,14 @@ jobs: run: npm ci - name: Publish to Chromatic + if: github.ref != 'refs/heads/main' uses: chromaui/action@a89b674adf766dbde41ad9ea2b2b60b91188a0f0 # v6.17.4 with: projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + + - name: Publish to Chromatic and auto accept changes + if: github.ref == 'refs/heads/main' + uses: chromaui/action@a89b674adf766dbde41ad9ea2b2b60b91188a0f0 # v6.17.4 + with: + projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + autoAcceptChanges: true