---
name: docs-preview

on:
  pull_request_target:
    types: [opened]

permissions:
  pull-requests: write

jobs:
  doc-preview-pr:
    runs-on: ubuntu-latest
    steps:
      - uses: elastic/docs/.github/actions/docs-preview@master
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          repo: ${{ github.event.repository.name }}
          preview-path: 'guide/en/elasticsearch/client/python-api/index.html'
          pr: ${{ github.event.pull_request.number }}
