mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-15 02:11:15 +08:00
more ci (#9004)
* asd * asd * asd * asd * asd * asd * asd * asd * asd * asd
This commit is contained in:
parent
4365237599
commit
f461b6ac52
34
.config/demos.json
Normal file
34
.config/demos.json
Normal file
@ -0,0 +1,34 @@
|
||||
[
|
||||
"audio_debugger",
|
||||
"blocks_essay",
|
||||
"blocks_group",
|
||||
"blocks_js_methods",
|
||||
"blocks_layout",
|
||||
"blocks_multiple_event_triggers",
|
||||
"blocks_update",
|
||||
"calculator",
|
||||
"cancel_events",
|
||||
"chatbot_multimodal",
|
||||
"chatinterface_streaming_echo",
|
||||
"clear_components",
|
||||
"code",
|
||||
"fake_gan",
|
||||
"fake_diffusion_with_gif",
|
||||
"file_explorer_component_events",
|
||||
"image_mod_default_image",
|
||||
"image_editor_events",
|
||||
"image_segmentation",
|
||||
"interface_random_slider",
|
||||
"kitchen_sink",
|
||||
"kitchen_sink_random",
|
||||
"matrix_transpose",
|
||||
"mini_leaderboard",
|
||||
"model3D",
|
||||
"native_plots",
|
||||
"reverse_audio",
|
||||
"stt_or_tts",
|
||||
"stream_audio",
|
||||
"stream_frames",
|
||||
"video_component",
|
||||
"zip_files"
|
||||
]
|
2
.github/actions/changes/action.yml
vendored
2
.github/actions/changes/action.yml
vendored
@ -66,7 +66,7 @@ runs:
|
||||
- name: upload JSON
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: output.json
|
||||
name: changes
|
||||
path: output.json
|
||||
- name: set outputs
|
||||
id: pr
|
||||
|
15
.github/workflows/previews-build.yml
vendored
15
.github/workflows/previews-build.yml
vendored
@ -52,7 +52,8 @@ jobs:
|
||||
with:
|
||||
name: gradio-lite-${{ github.sha }}
|
||||
path: js/lite/gradio-lite-*.tgz
|
||||
|
||||
- name: install deps
|
||||
run: python -m pip install build
|
||||
- name: Build pr package
|
||||
run: |
|
||||
python -c 'import json; j = json.load(open("gradio/package.json")); j["version"] = "${{ needs.changes.outputs.gradio_version }}"; json.dump(j, open("gradio/package.json", "w"))'
|
||||
@ -65,13 +66,13 @@ jobs:
|
||||
- name: copy demos
|
||||
uses: "gradio-app/github/actions/copy-demos@main"
|
||||
with:
|
||||
gradio_version: "https://gradio-builds.s3.amazonaws.com/${{ needs.changes.outputs.sha }}/gradio-${{ needs.changes.outputs.gradio_version }}-py3-none-any.whl"
|
||||
gradio_version: "https://gradio-pypi-previews.s3.amazonaws.com/${{ needs.changes.outputs.sha }}/gradio-${{ needs.changes.outputs.gradio_version }}-py3-none-any.whl"
|
||||
gradio_client_version: "gradio-client @ git+https://github.com/gradio-app/gradio@${{ needs.changes.outputs.sha }}#subdirectory=client/python"
|
||||
- name: upload demos
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: demos
|
||||
path: demos/all_demos
|
||||
name: demo
|
||||
path: demo/all_demos
|
||||
- name: Create JS client tarball
|
||||
id: create_js_tarball
|
||||
continue-on-error: true
|
||||
@ -84,9 +85,3 @@ jobs:
|
||||
with:
|
||||
name: js-client-tarball
|
||||
path: ${{ steps.create_js_tarball.outputs.tarball_name }}
|
||||
|
||||
- name: upload storybook
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: storybook-static
|
||||
path: storybook-static
|
||||
|
30
.github/workflows/previews-deploy.yml
vendored
30
.github/workflows/previews-deploy.yml
vendored
@ -17,20 +17,28 @@ jobs:
|
||||
changes:
|
||||
name: "changes"
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
outputs:
|
||||
should_run: ${{ steps.changes.outputs.should_run }}
|
||||
sha: ${{ steps.changes.outputs.sha }}
|
||||
pr_number: ${{ steps.changes.outputs.pr_number }}
|
||||
source_branch: ${{ steps.changes.outputs.source_branch }}
|
||||
source_repo: ${{ steps.changes.outputs.source_repo }}
|
||||
gradio_version: ${{ steps.changes.outputs.gradio_version }}
|
||||
should_run: ${{ steps.json.outputs.should_run }}
|
||||
sha: ${{ steps.json.outputs.sha }}
|
||||
pr_number: ${{ steps.json.outputs.pr_number }}
|
||||
source_branch: ${{ steps.json.outputs.source_branch }}
|
||||
source_repo: ${{ steps.json.outputs.source_repo }}
|
||||
labels: ${{ steps.json.outputs.labels }}
|
||||
run_id: ${{ steps.json.outputs.run_id }}
|
||||
gradio_version: ${{ steps.json.outputs.gradio_version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: "gradio-app/gradio/.github/actions/changes@main"
|
||||
id: changes
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
filter: "functional"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
name: changes
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
run-id: ${{ github.event.workflow_run.id }}
|
||||
- uses: gradio-app/github/actions/json-to-output@main
|
||||
id: json
|
||||
with:
|
||||
path: output.json
|
||||
|
||||
comment-spaces-start:
|
||||
needs: changes
|
||||
|
5
.github/workflows/storybook-deploy.yml
vendored
5
.github/workflows/storybook-deploy.yml
vendored
@ -28,8 +28,7 @@ jobs:
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: artifact-dir
|
||||
path: different_dir
|
||||
name: changes
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
run-id: ${{ github.event.workflow_run.id }}
|
||||
- uses: gradio-app/github/actions/json-to-output@main
|
||||
@ -79,6 +78,8 @@ jobs:
|
||||
path: storybook-static
|
||||
run-id: ${{ github.event.workflow_run.id }}
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: list artifacts
|
||||
run: ls -R .
|
||||
- name: publish to chromatic
|
||||
id: publish-chromatic
|
||||
uses: chromaui/action@v11
|
||||
|
2
.github/workflows/website-build.yml
vendored
2
.github/workflows/website-build.yml
vendored
@ -48,7 +48,7 @@ jobs:
|
||||
run: pnpm --filter @gradio/client build
|
||||
|
||||
- name: build website
|
||||
run: pnpm --filter @gradio/website build
|
||||
run: VERCEL=1 pnpm --filter website build
|
||||
|
||||
- name: upload website artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
|
47
.github/workflows/website-deploy.yml
vendored
47
.github/workflows/website-deploy.yml
vendored
@ -2,7 +2,7 @@ name: "deploy / website"
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["trigger"]
|
||||
workflows: ["website-build"]
|
||||
types:
|
||||
- requested
|
||||
|
||||
@ -22,22 +22,27 @@ jobs:
|
||||
changes:
|
||||
name: "changes"
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
outputs:
|
||||
should_run: ${{ steps.changes.outputs.should_run }}
|
||||
sha: ${{ steps.changes.outputs.sha }}
|
||||
merge_sha: ${{ steps.changes.outputs.merge_sha }}
|
||||
pr_number: ${{ steps.changes.outputs.pr_number }}
|
||||
source_branch: ${{ steps.changes.outputs.source_branch }}
|
||||
source_repo: ${{ steps.changes.outputs.source_repo }}
|
||||
mergeable: ${{ steps.changes.outputs.mergeable }}
|
||||
should_run: ${{ steps.json.outputs.should_run }}
|
||||
sha: ${{ steps.json.outputs.sha }}
|
||||
pr_number: ${{ steps.json.outputs.pr_number }}
|
||||
source_branch: ${{ steps.json.outputs.source_branch }}
|
||||
source_repo: ${{ steps.json.outputs.source_repo }}
|
||||
labels: ${{ steps.json.outputs.labels }}
|
||||
run_id: ${{ steps.json.outputs.run_id }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: "gradio-app/gradio/.github/actions/changes@main"
|
||||
id: changes
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
type: "website"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit_status: false
|
||||
name: changes
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
run-id: ${{ github.event.workflow_run.id }}
|
||||
- uses: gradio-app/github/actions/json-to-output@main
|
||||
id: json
|
||||
with:
|
||||
path: output.json
|
||||
comment-deploy-start:
|
||||
needs: changes
|
||||
uses: "./.github/workflows/comment-queue.yml"
|
||||
@ -66,6 +71,14 @@ jobs:
|
||||
with:
|
||||
name: website-templates
|
||||
path: js/_website/lib/templates
|
||||
- name: download website artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: website
|
||||
path: js/_website/.vercel
|
||||
|
||||
- name: list files
|
||||
run: ls -R .
|
||||
|
||||
- name: deploy json to aws
|
||||
if: startsWith(needs.changes.outputs.source_branch, 'changeset-release/') && needs.changes.outputs.source_repo == 'gradio-app/gradio'
|
||||
@ -77,12 +90,6 @@ jobs:
|
||||
aws s3 cp ./js/_website/lib/json/ s3://gradio-docs-json/$version/ --recursive
|
||||
aws s3 cp ./js/_website/lib/templates/ s3://gradio-docs-json/$version/templates/ --recursive
|
||||
|
||||
- name: download website artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: website
|
||||
path: js/_website/.vercel
|
||||
|
||||
# preview
|
||||
- name: Pull Vercel Environment Information
|
||||
shell: bash
|
||||
|
Loading…
Reference in New Issue
Block a user