gradio/.github/workflows/build-version-docs.yml
renovate[bot] 0807a7c227
chore(deps): update actions/setup-python action to v4 (#4611)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-21 19:15:52 +01:00

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