mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-21 02:19:59 +08:00
d30432e9c6
* test pr * conditional * conditional * conditional * conditional * conditional * changes * changes * add changeset * changes --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
57 lines
1.5 KiB
YAML
57 lines
1.5 KiB
YAML
name: "storybook-build"
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
- 5.0-dev
|
|
|
|
env:
|
|
CI: true
|
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
|
|
NODE_OPTIONS: "--max-old-space-size=4096"
|
|
|
|
concurrency:
|
|
group: "${{ github.event.pull_request.number }}-${{ github.ref_name }}-${{ github.workflow }}"
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
changes:
|
|
name: "changes"
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
should_run: ${{ steps.changes.outputs.should_run }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: "gradio-app/gradio/.github/actions/changes@main"
|
|
id: changes
|
|
with:
|
|
filter: "visual"
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
test:
|
|
name: test
|
|
runs-on: ubuntu-22.04
|
|
needs: changes
|
|
if: needs.changes.outputs.should_run == 'true'
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: install dependencies
|
|
uses: "gradio-app/gradio/.github/actions/install-all-deps@main"
|
|
with:
|
|
always_install_pnpm: true
|
|
skip_build: "true"
|
|
- name: build client
|
|
run: pnpm --filter @gradio/client build
|
|
- name: generate theme.css
|
|
run: |
|
|
. venv/bin/activate
|
|
python scripts/generate_theme.py --outfile js/storybook/theme.css
|
|
- name: build storybook
|
|
run: pnpm build-storybook --quiet
|
|
- name: upload storybook
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: storybook-static
|
|
path: storybook-static
|