Support Jetter (buck) workspace #4342
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docs Build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: write | |
| jobs: | |
| docbuild: | |
| runs-on: linux.24_04.4x | |
| steps: | |
| - name: Checkout TorchX | |
| uses: actions/checkout@v2 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| python-version: "3.12" | |
| enable-cache: true | |
| - name: Install Doc Dependencies | |
| run: | | |
| set -eux | |
| sudo apt-get update | |
| sudo apt-get install -y pandoc | |
| uv sync --frozen --extra dev --extra docs | |
| # pytorch_sphinx_theme is a git dependency, install separately | |
| uv pip install git+http://github.com/pytorch/pytorch_sphinx_theme.git | |
| - name: Doc Test | |
| run: | | |
| cd docs | |
| uv run make doctest | |
| - name: Linkcheck | |
| run: | | |
| cd docs | |
| uv run make linkcheck | |
| - name: Doc Build | |
| run: | | |
| cd docs | |
| uv run make html | |
| - name: Papermill | |
| run: | | |
| cd docs | |
| uv run make papermill | |
| - name: Coverage | |
| run: | | |
| set -ex | |
| cd docs | |
| uv run make coverage | |
| if [ "$(wc -l build/*/coverage/python.txt)" -ne 2 ] | |
| then | |
| cat build/*/coverage/python.txt | |
| echo "missing documentation coverage!" | |
| exit 1 | |
| fi | |
| docpush: | |
| runs-on: linux.24_04.4x | |
| needs: docbuild | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| steps: | |
| - name: Checkout TorchX | |
| uses: actions/checkout@v2 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| python-version: "3.12" | |
| enable-cache: true | |
| - name: Set Identity | |
| run: | | |
| set -ex | |
| git config --global user.email "runner@github.com" | |
| git config --global user.name "TorchX CI Runner" | |
| - name: Install Dependencies | |
| run: | | |
| set -eux | |
| sudo apt-get install -y pandoc | |
| uv sync --frozen --extra dev --extra docs | |
| uv pip install git+http://github.com/pytorch/pytorch_sphinx_theme.git | |
| - name: Build | |
| run: | | |
| set -ex | |
| uv run docs/doc_push.sh --dry-run | |
| - name: Push | |
| run: | | |
| set -ex | |
| cd /tmp/torchx_docs_tmp/torchx_gh_pages | |
| git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | |
| git push |