[workflow] added trigger to build doc upon release (#2678)

pull/2680/head
Frank Lee 2023-02-13 16:53:26 +08:00 committed by GitHub
parent 40c916b192
commit c44fd0c867
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,28 @@
name: Build Documentation upon Release
on:
workflow_dispatch:
pull_request:
paths:
- 'version.txt'
types:
- closed
jobs:
build-doc:
name: Trigger Documentation Build Workflow
if: ( github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true ) && github.repository == 'hpcaitech/ColossalAI'
runs-on: ubuntu-latest
steps:
- name: trigger workflow in ColossalAI-Documentation
run: |
gh
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${GH_TOKEN}"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/hpcaitech/ColossalAI-Documentation/actions/workflows/deploy.yml/dispatches \
-d '{"ref":"main"}'
env:
GH_TOKEN: ${{secrets.DOC_REPO_TOKEN}}