mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-27 01:40:20 +08:00
parent
a58b6ac1af
commit
8971bfde53
29
.github/workflows/website-build.yml
vendored
29
.github/workflows/website-build.yml
vendored
@ -17,21 +17,30 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
if: github.event.workflow_run.conclusion == 'success'
|
||||
name: "changes"
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
outputs:
|
||||
should_run: ${{ steps.changes.outputs.should_run }}
|
||||
sha: ${{ steps.changes.outputs.sha }}
|
||||
gradio_version: ${{ steps.changes.outputs.gradio_version }}
|
||||
source_repo: ${{ steps.changes.outputs.source_repo }}
|
||||
source_branch: ${{ steps.changes.outputs.source_branch }}
|
||||
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:
|
||||
filter: "website"
|
||||
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
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: output.json
|
||||
|
10
.github/workflows/website-docs-build.yml
vendored
10
.github/workflows/website-docs-build.yml
vendored
@ -16,8 +16,14 @@ concurrency:
|
||||
group: "${{ github.event.pull_request.number }}-${{ github.ref_name }}-${{ github.workflow }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
if: github.event_name == 'pull_request' || github.event_name == 'push'
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
name: "changes"
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
@ -33,6 +39,8 @@ jobs:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
build:
|
||||
permissions:
|
||||
contents: read
|
||||
name: "docs-build"
|
||||
runs-on: ubuntu-22.04
|
||||
needs: changes
|
||||
@ -44,7 +52,7 @@ jobs:
|
||||
with:
|
||||
skip_build: true
|
||||
- name: generate docs
|
||||
run: pip install boto3 && python js/_website/generate_jsons/generate.py
|
||||
run: pip install boto3 requests && python js/_website/generate_jsons/generate.py
|
||||
|
||||
- name: upload website json artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
|
Loading…
Reference in New Issue
Block a user