mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-21 02:19:59 +08:00
0807a7c227
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
43 lines
1.3 KiB
YAML
43 lines
1.3 KiB
YAML
# This workflow will build gradio and create the version's docs file when a new stable version has been released
|
|
|
|
name: Create Version's Docs
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
types: closed
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'gradio/version.txt'
|
|
|
|
|
|
jobs:
|
|
check-version:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.x'
|
|
- name: Install requirements
|
|
run: python -m pip install -r website/homepage/requirements.txt
|
|
- name: Check new pypi version
|
|
run: cd website && python check_version.py
|
|
build-docs:
|
|
needs: check-version
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install requirements
|
|
run: python -m pip install -r website/homepage/requirements.txt
|
|
- name: Pin httpx, httpcore, and h11
|
|
run: pip install h11==0.12.0 httpcore==0.15.0 httpx==0.23.0
|
|
- name: Wait 5 min
|
|
run: sleep 300
|
|
- name: Install gradio
|
|
run: python -m pip install gradio==$(cat gradio/version.txt)
|
|
- name: Build Docs
|
|
run: |
|
|
export HF_AUTH_TOKEN=${{ secrets.HF_AUTH_TOKEN }}
|
|
cd website/homepage && python build-version-docs.py |