Skip to content

Java: Add docs for OAuth Refresh Token #5415

Java: Add docs for OAuth Refresh Token

Java: Add docs for OAuth Refresh Token #5415

name: Build Cloud SDK Documentation
on:
pull_request:
branches: [main]
jobs:
checks:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Determine Changed Files
id: changed-files
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
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- 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 }}
# You may pin to the exact commit or the version.
# uses: errata-ai/vale-action@0da98680790f89b8d5b685de9c264f55addc971b
uses: errata-ai/vale-action@reviewdog
with:
# version of 'vale' to use
# see https://github.com/errata-ai/vale for all releases
version: 3.0.5
# 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
env:
# Required
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/cache@v4
id: cache
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@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/cache@v4
id: cache
with:
path: node_modules
key: ubuntu-latest-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm ci
- name: Build docs
run: npm run build
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' }}
needs: [build]
permissions:
pull-requests: write
contents: write
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2.1.0
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}