Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

ci: add publish-storybook.yml

Alex Yangde2cb1a3bc1a
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 44423069f6..682e5169de 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -133,28 +133,6 @@ jobs:
path: ./apps/storybook/storybook-static
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:
name: Build @affine/core
runs-on: ubuntu-latest
diff --git a/.github/workflows/publish-storybook.yml b/.github/workflows/publish-storybook.yml
new file mode 100644
index 0000000000..230bfe5c56
--- /dev/null
+++ b/.github/workflows/publish-storybook.yml
@@ -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 }}