From c44fd0c867939ecdd5089ae0fcc5879896c18151 Mon Sep 17 00:00:00 2001 From: Frank Lee Date: Mon, 13 Feb 2023 16:53:26 +0800 Subject: [PATCH] [workflow] added trigger to build doc upon release (#2678) --- .github/workflows/doc_build_after_merge.yml | 28 +++++++++++++++++++ ...heck_doc_on_pr.yml => doc_check_on_pr.yml} | 0 2 files changed, 28 insertions(+) create mode 100644 .github/workflows/doc_build_after_merge.yml rename .github/workflows/{check_doc_on_pr.yml => doc_check_on_pr.yml} (100%) diff --git a/.github/workflows/doc_build_after_merge.yml b/.github/workflows/doc_build_after_merge.yml new file mode 100644 index 000000000..dae3b70e1 --- /dev/null +++ b/.github/workflows/doc_build_after_merge.yml @@ -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}} diff --git a/.github/workflows/check_doc_on_pr.yml b/.github/workflows/doc_check_on_pr.yml similarity index 100% rename from .github/workflows/check_doc_on_pr.yml rename to .github/workflows/doc_check_on_pr.yml