172 front task chore storybook deploy #15
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Chromatic Deployment" | |
| on: | |
| pull_request: | |
| branches: | |
| - develop | |
| jobs: | |
| chromatic-deployment: | |
| name: Chromatic | |
| runs-on: ubuntu-latest | |
| outputs: | |
| statis: ${{ job.status }} | |
| # permissions: | |
| # contents: read | |
| # pull-requests: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install dependencies | |
| run: yarn | |
| - name: Publish to Chromatic | |
| id: chromatic | |
| uses: chromaui/action@latest | |
| with: | |
| exitZeroOnChanges: true | |
| autoAcceptChanges: true | |
| projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
| token: ${{ secrets.TOKEN }} | |
| - name: Publish Summary | |
| run: echo -e "Result ${{ steps.chromatic.outputs.buildUrl }} Storybook Preview ${{ steps.chromatic.outputs.storybookUrl }}" >> $GITHUB_STEP_SUMMARY | |
| - name: comment PR | |
| uses: thollander/actions-comment-pull-request@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.TOKEN }} | |
| with: | |
| message: "🚀storybook: ${{ steps.chromatic.outputs.storybookUrl }}" | |
| # - name: Get PR data | |
| # uses: actions/github-script@v7 | |
| # id: get_pr_data | |
| # with: | |
| # script: | | |
| # return ( | |
| # await github.rest.repos.listPullRequestsAssociatedWithCommit({ | |
| # commit_sha: context.sha, | |
| # owner: context.repo.owner, | |
| # repo: context.repo.repo, | |
| # }) | |
| # ).data[0]; | |
| # - name: Pull Request data | |
| # run: | | |
| # echo '${{ fromJson(steps.get_pr_data.outputs.result).number }}' | |
| # echo '${{ fromJson(steps.get_pr_data.outputs.result).title }}' | |
| # - name: Comment PR | |
| # uses: thollander/actions-comment-pull-request@v3 | |
| # with: | |
| # message: | | |
| # Hello world ! :wave: | |
| # - name: comment PR | |
| # uses: thollander/actions-comment-pull-request@v1 | |
| # env: | |
| # GITHUB_TOKEN: ${{ secrets.TOKEN }} | |
| # with: | |
| # message: "🚀storybook: ${{ steps.chromatic.outputs.storybookUrl }}" | |
| # - name: Save PR number and Chromatic build outputs | |
| # run: | | |
| # mkdir -p ./pr | |
| # echo "${{ github.event.pull_request.number }}" > ./pr/prNumber | |
| # echo "${{ steps.chromatic.outputs.storybookUrl }}" > ./pr/storybookUrl | |
| # echo "${{ steps.chromatic.outputs.buildUrl }}" > ./pr/buildUrl |