Files
twenty/.github/workflows/ci-docs.yaml
Raphaël Bosi a3ba7be23d Add live previews to Twenty UI documentation (#25889)
Add embedded Storybook previews to all 17 Twenty UI component
documentation pages, with light and dark themes and interactive
examples.

On `main` and SDK or UI release tags, `CD Storybook UI` builds the
public Storybook, checks that the documentation's embedded story IDs
exist, and uploads the static site as a GitHub Actions artifact.

After the build, it dispatches `deploy-storybook-ui.yaml` in
`twenty-factory` with the source run ID. Factory validates the
successful source run, downloads its artifact, and publishes the static
files to Cloudflare Pages without executing the downloaded site.
Cloudflare credentials stay in factory's `storybook-ui` environment.

`main` updates the production site; release tags publish version aliases
such as `v2-42-0.twenty-ui-storybook.pages.dev`.

Merge [twenty-factory
#120](https://github.com/twentyhq/twenty-factory/pull/120) first and
complete the Cloudflare project, token, and GitHub environment setup in
its description before merging this PR. That description also covers
validating the first deployment and switching `storybook.twenty.com` to
Pages.

<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/twentyhq/twenty/pull/25889?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
2026-09-15 11:24:07 +00:00

54 lines
1.2 KiB
YAML

name: CI Docs
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
changed-files-check:
uses: ./.github/workflows/changed-files.yaml
with:
files: |
package.json
yarn.lock
packages/twenty-ui/**
packages/twenty-shared/**
.github/workflows/ci-docs.yaml
packages/twenty-docs/**
docs-lint:
needs: changed-files-check
if: needs.changed-files-check.outputs.any_changed == 'true'
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Fetch local actions
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 10
- name: Install dependencies
uses: ./.github/actions/yarn-install
- name: Docs / Lint
run: npx nx lint twenty-docs
- name: Docs / Test
run: npx nx test twenty-docs
- name: Docs / Generated UI references
run: npx nx check:ui twenty-docs
- name: Docs / Storybook embeds
run: npx nx check:ui-stories twenty-docs