Skip to content

Update draft dispatch workflow to use managed PAT #34

Update draft dispatch workflow to use managed PAT

Update draft dispatch workflow to use managed PAT #34

name: Deploy Draft
on:
pull_request:
branches:
- '**'
jobs:
dispatch-deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy Draft
run: |
gh auth login --with-token ${{ secrets.DOC_GITHUB_PAT_CROSS_ORG }}
echo "${{ env.WORKFLOW_INPUT }}" \
| gh workflow run -R riptano/datastax-docs-site deploy-draft.yml --ref $WORKFLOW_REF --json
sleep 5
gh run watch -R riptano/datastax-docs-site $(gh run list -R riptano/datastax-docs-site -L1 --json databaseId --jq '.[0].databaseId')
env:
WORKFLOW_REF: main
WORKFLOW_INPUT: '{ "build_repository": "${{ github.event.repository.full_name }}", "build_branch": "${{ github.base_ref }}", "draft_branch": "${{ github.event.pull_request.head.ref }}", "pull_request_number": "${{ github.event.pull_request.number }}" }'
GH_TOKEN: ${{ secrets.DOC_GITHUB_PAT_CROSS_ORG }}