Drop support for Python 3.9, add support for Python 3.13 #1069
Workflow file for this run
This file contains 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 | |
on: [push, pull_request] | |
jobs: | |
build-docs: | |
strategy: | |
matrix: | |
python-version: | |
- "3.12" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Need full history to determine version number. | |
fetch-depth: 0 | |
- name: "Set up Python ${{ matrix.python-version }}" | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: "Configure bazel remote cache write credentials" | |
env: | |
BAZEL_CACHE_SERVICE_ACCOUNT_KEY: ${{ secrets.BAZEL_CACHE_SERVICE_ACCOUNT_KEY }} | |
run: python ./tools/ci/configure_bazel_remote_cache.py --bazelrc ~/ci_bazelrc docs | |
shell: bash | |
- name: Get pip cache dir | |
id: pip-cache | |
shell: bash | |
run: | | |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
with: | |
path: ${{ steps.pip-cache.outputs.dir }} | |
key: pip-${{ runner.os }}-docs-${{ matrix.python-version }}-${{ hashFiles('third_party/pypa/workspace.bzl') }} | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/bazel/_bazel_*/cache/repos | |
~/.cache/bazelisk | |
key: bazel-docs-${{ hashFiles('.bazelversion', 'WORKSPACE', 'external.bzl', 'third_party/**') }} | |
- name: Build documentation | |
run: CC=gcc-10 python -u bazelisk.py --bazelrc ~/ci_bazelrc run --announce_rc --show_timestamps --keep_going --color=yes --verbose_failures //docs:build_docs -- --output docs_output | |
shell: bash | |
- run: zip -r docs_output.zip docs_output | |
- name: Upload docs as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs | |
path: docs_output.zip | |
publish-docs: | |
# Only publish package on push to tag or default branch. | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
runs-on: ubuntu-latest | |
needs: | |
- build-docs | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: docs | |
- run: unzip docs_output.zip | |
- name: Publish to gh-pages | |
uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3 (2020-10-20) | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs_output |