Skip to content

Docs(python): add Python SDK documentation section #6730

Docs(python): add Python SDK documentation section

Docs(python): add Python SDK documentation section #6730

name: Build Cloud SDK Documentation
on:
pull_request:
branches: [main]
permissions: {}
jobs:
checks:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write # for reviewdog/vale
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Determine Changed Files
id: changed-files
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
ALL_FILES=$(gh pr view ${{ github.event.pull_request.number }} --json files --jq '.files.[] | select(.additions > 0) | .path')
CHANGED_FILES="${ALL_FILES//$'\n'/,}"
echo "[DEBUG] Following files have been changed: $CHANGED_FILES"
echo "CHANGED_FILES=$CHANGED_FILES" >> $GITHUB_OUTPUT
- name: Vale Linter
# vale fails if the PR is too large, e.g. when updating API docs
if: ${{ github.event.pull_request.changed_files < 100 }}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
uses: vale-cli/vale-action@518a9136acc6e6668ce7c00d367051e0941e87ff # v3.0.0
with:
# version of 'vale' to use
# see https://github.com/errata-ai/vale for all releases
version: 3.14.1
# changed files. computed in the step above
files: ${{ steps.changed-files.outputs.CHANGED_FILES }}
# the separator for the file list. we are using a comma (see step above)
separator: ","
# let review dog fail if there are errors
fail_on_error: true
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
- id: cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: node_modules
key: ubuntu-latest-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm ci
- name: ESlint and Prettier
run: npm run lint
build:
runs-on: ubuntu-latest
needs: [checks]
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
- id: cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: node_modules
key: ubuntu-latest-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm ci
- name: Build docs
run: npm run build