updated workflow

This commit is contained in:
SwiftyOS
2024-10-16 12:31:37 +02:00
parent fbfb8838fd
commit 5465296ba6

View File

@@ -1,28 +1,50 @@
# Workflow name
name: 'Platform Publish Storybook'
name: 'AutoGPT Platform - Frontend Publish Storybook'
# Event for the workflow
on: push
on:
push:
branches: [master]
paths:
- ".github/workflows/platform-publish-storybook.yml"
- "autogpt_platform/frontend/**"
pull_request:
paths:
- ".github/workflows/platform-publish-storybook.yml"
- "autogpt_platform/frontend/**"
defaults:
run:
shell: bash
working-directory: autogpt_platform/frontend
# List of jobs
jobs:
test:
publish-storybook:
# Operating System
runs-on: ubuntu-latest
# Job steps
steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
submodules: recursive
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: "21"
cache: 'yarn'
- run: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build Storybook
run: yarn build-storybook
#👇 Adds Chromatic as a step in the workflow
- uses: chromaui/action@v1
- name: Publish to Chromatic
uses: chromaui/action@v1
# Options required for Chromatic's GitHub Action
with:
#👇 Chromatic projectToken,
#👇 Chromatic projectToken
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
storybookBuildDir: storybook-static