From fbfb8838fdc92e39a8503a2bf2d420474145c28a Mon Sep 17 00:00:00 2001 From: SwiftyOS Date: Wed, 16 Oct 2024 12:29:13 +0200 Subject: [PATCH] added publishing of storybooks to chromatic --- .../workflows/platform-publish-storybook.yml | 28 +++++++++++++++++++ autogpt_platform/frontend/package.json | 1 + autogpt_platform/frontend/yarn.lock | 5 ++++ 3 files changed, 34 insertions(+) create mode 100644 .github/workflows/platform-publish-storybook.yml diff --git a/.github/workflows/platform-publish-storybook.yml b/.github/workflows/platform-publish-storybook.yml new file mode 100644 index 000000000000..4e25c14464e5 --- /dev/null +++ b/.github/workflows/platform-publish-storybook.yml @@ -0,0 +1,28 @@ +# Workflow name +name: 'Platform Publish Storybook' + +# Event for the workflow +on: push + +# List of jobs +jobs: + test: + # Operating System + runs-on: ubuntu-latest + # Job steps + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version: 18 + cache: 'yarn' + - run: yarn + #👇 Adds Chromatic as a step in the workflow + - uses: chromaui/action@v1 + # Options required for Chromatic's GitHub Action + with: + #👇 Chromatic projectToken, + projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/autogpt_platform/frontend/package.json b/autogpt_platform/frontend/package.json index bbfbe62aab29..4f56be18f9f9 100644 --- a/autogpt_platform/frontend/package.json +++ b/autogpt_platform/frontend/package.json @@ -86,6 +86,7 @@ "@types/react": "^18", "@types/react-dom": "^18", "@types/react-modal": "^3.16.3", + "chromatic": "^11.12.5", "concurrently": "^9.0.1", "eslint": "^8", "eslint-config-next": "14.2.4", diff --git a/autogpt_platform/frontend/yarn.lock b/autogpt_platform/frontend/yarn.lock index 53993803ea05..f11e08c0a3e2 100644 --- a/autogpt_platform/frontend/yarn.lock +++ b/autogpt_platform/frontend/yarn.lock @@ -4926,6 +4926,11 @@ chokidar@^3.5.3: optionalDependencies: fsevents "~2.3.2" +chromatic@^11.12.5: + version "11.12.5" + resolved "https://registry.npmjs.org/chromatic/-/chromatic-11.12.5.tgz" + integrity sha512-5z+BXQy3TMyXIzCdCDO9Psc8aMs9kIrCFHhMgYbwA6dTXxAL0oUjHZbICn5h4Ay/fM9cZQPaCH9T7a3myPA8Sw== + chrome-trace-event@^1.0.2: version "1.0.4" resolved "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz"