ci: add publish-storybook.yml

This commit is contained in:
Alex Yang 2023-08-16 00:36:24 -05:00
parent 08f01ea1b3
commit de2cb1a3bc
2 changed files with 29 additions and 22 deletions

View File

@ -133,28 +133,6 @@ jobs:
path: ./apps/storybook/storybook-static path: ./apps/storybook/storybook-static
if-no-files-found: error if-no-files-found: error
publish-storybook:
name: Publish Storybook
runs-on: ubuntu-latest
environment: development
steps:
- uses: actions/checkout@v3
with:
# This is required to fetch all commits for chromatic
fetch-depth: 0
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
electron-install: false
- name: Publish to Chromatic
uses: chromaui/action@v1
with:
workingDir: apps/storybook
buildScriptName: build
onlyStoryNames: 'Preview/**'
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
build-core: build-core:
name: Build @affine/core name: Build @affine/core
runs-on: ubuntu-latest runs-on: ubuntu-latest

29
.github/workflows/publish-storybook.yml vendored Normal file
View File

@ -0,0 +1,29 @@
on:
pull_request_target:
branches:
- master
paths-ignore:
- README.md
- .github/**
- '!.github/workflows/publish-storybook.yml'
jobs:
publish-storybook:
name: Publish Storybook
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# This is required to fetch all commits for chromatic
fetch-depth: 0
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
electron-install: false
- name: Publish to Chromatic
uses: chromaui/action@v1
with:
workingDir: apps/storybook
buildScriptName: build
onlyStoryNames: 'Preview/**'
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}