Ci website (#9056)

* tweaks

* more fix

* changes
This commit is contained in:
pngwn 2024-08-07 18:41:54 +01:00 committed by GitHub
parent a58b6ac1af
commit 8971bfde53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 28 additions and 11 deletions

View File

@ -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

View File

@ -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