Skip to content

Update draft dispatch workflow to use managed PAT #27

Update draft dispatch workflow to use managed PAT

Update draft dispatch workflow to use managed PAT #27

name: Deploy Draft
on:
pull_request:
branches:
- '**'
jobs:
dispatch-deploy:
runs-on: ubuntu-latest
steps:
- name: Test
uses: actions/github-script@v6
with:
github-token: ${{ secrets.DOC_GITHUB_PAT_CROSS_ORG }}
script: |
const result = await github.rest.actions.createWorkflowDispatch({
owner: 'riptano',
repo: 'datastax-docs-site',
workflow_id: 'deploy-draft.yml',
ref: 'main'
})
console.log(result)
- name: Deploy Draft
uses: convictional/[email protected]
with:
owner: riptano
repo: datastax-docs-site
github_token: ${{ secrets.DOC_GITHUB_PAT_CROSS_ORG }}
workflow_file_name: deploy-draft.yml
client_payload: '{ "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 }}" }'