Skip to content

Commit 35cef1b

Browse files
edmunditojhammarstedt
authored andcommitted
🪟 🔧 Publish webapp storybook to chromatic in CI (airbytehq#16169)
* Add Publish to storybook step in webapp gradle workflow * Set fetch-dept to 0 for airbyte webapp build * Fix typo in chromatic config * Fix typo when you've been writing too much css * Fix storybook build path in gradle workflow * Use full path in chromatic action * Try another path configuration for chromatic workflow action * Use label ot token in storybook deploy * Back to github_token * Move Storybook deploy to separate job * Fix run command in publish storybook workflow * Rollback publish storybook as separate step from build-frontend, add correct github token to step * Let the chromatic step build the storybook * Restore storybookBuildDir on publish to chromatic step * Add exitOnceUploaded to chromatic action
1 parent cc94175 commit 35cef1b

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/gradle.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,15 @@ jobs:
298298
github-token: ${{ needs.find_valid_pat.outputs.pat }}
299299
frontend-build:
300300
name: "Frontend: Build"
301-
needs: start-frontend-runner
301+
needs:
302+
- start-frontend-runner
303+
- find_valid_pat
302304
runs-on: ${{ needs.start-frontend-runner.outputs.label }}
303305
steps:
304306
- name: Checkout Airbyte
305307
uses: actions/checkout@v2
308+
with:
309+
fetch-depth: 0
306310

307311
- name: Cache Build Artifacts
308312
uses: ./.github/actions/cache-build-artifacts
@@ -333,6 +337,17 @@ jobs:
333337
334338
- name: Build :airbyte-webapp
335339
run: SUB_BUILD=PLATFORM ./gradlew --no-daemon :airbyte-webapp:build --scan
340+
341+
- name: Publish Storybook to Chromatic
342+
uses: chromaui/action@v1
343+
with:
344+
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
345+
token: ${{ needs.find_valid_pat.outputs.pat }}
346+
workingDir: ./airbyte-webapp/
347+
storybookBuildDir: build/storybook/
348+
exitOnceUploaded: true
349+
350+
336351
frontend-test:
337352
name: "Frontend: Run End-to-End Tests"
338353
needs:

0 commit comments

Comments
 (0)