env:
  GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
  VERSION: ${{ github.event.client_payload.ref }}
  COMMIT_SHA: ${{ github.event.client_payload.commitSha }}

on:
  repository_dispatch:
    types:
      - docs

jobs:
  docs:
    name: Build Package Docs
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Checkout Scripts Repo
        uses: actions/checkout@v2
        with:
          path: ci-scripts
          repository: pulumi/scripts
      - name: Trigger Docs Build
        run: |
          ./ci-scripts/ci/build-package-docs.sh "pulumi"
        env:
          TRAVIS: true
          PULUMI_BOT_GITHUB_API_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
          TRAVIS_TAG: ${{ env.VERSION }}
