Skip to content

Update draft dispatch workflow to use managed PAT #37

Update draft dispatch workflow to use managed PAT

Update draft dispatch workflow to use managed PAT #37

name: Deploy Draft
on:
pull_request:
branches:
- '**'
jobs:
dispatch-deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy Draft
run: |
echo '{ "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 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
GH_TOKEN: ${{ secrets.DOC_GITHUB_PAT_CROSS_ORG }}