name: 'Storybook Chromatic' on: pull_request jobs: storybook-chromatic: runs-on: ubuntu-latest if: github.event.pull_request.head.repo.full_name == github.repository steps: - uses: actions/checkout@v2 with: fetch-depth: 0 # 👈 Required to retrieve git history (https://www.chromatic.com/docs/github-actions) - name: Install dependencies and chromatic run: yarn add --dev chromatic - name: Publish to Chromatic uses: chromaui/action@v1 with: token: ${{ secrets.GITHUB_TOKEN }} # 👇 Chromatic projectToken, refer to the manage page to obtain it. projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}