Full git history is required by the chromatic plugin to work properly & publish the site. Hence adding `fetch-depth: 0` back into the Chromatic workflow <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Updated GitHub Actions workflows to fetch the full Git history for more accurate CI/CD operations. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
name: "Build Storybook - Docs with Chromatic"
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- release
|
|
paths:
|
|
- "app/client/packages/design-system/**"
|
|
- "app/client/packages/storybook/**"
|
|
pull_request:
|
|
paths:
|
|
- "app/client/packages/design-system/**"
|
|
- "app/client/packages/storybook/**"
|
|
|
|
jobs:
|
|
chromatic-deployment:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout PR if pull_request event
|
|
if: github.event_name == 'pull_request'
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
|
|
|
- name: Checkout PR if push event
|
|
if: github.event_name == 'push'
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
ref: release
|
|
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version-file: app/client/package.json
|
|
|
|
- name: Install Dependencies
|
|
working-directory: ./app/client/packages/storybook
|
|
run: yarn install --immutable
|
|
|
|
- name: Publish to Chromatic
|
|
id: chromatic-publish
|
|
uses: chromaui/action@v1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
projectToken: ${{ secrets.STORYBOOK_PROJECT_TOKEN }}
|
|
workingDir: ./app/client/packages/storybook
|
|
exitOnceUploaded: true
|
|
buildScriptName: "build"
|