From c4a04b4c0a467cfb61c438e27ab8d7fe046e0df4 Mon Sep 17 00:00:00 2001 From: Mishig Davaadorj Date: Mon, 8 Apr 2024 11:15:59 +0200 Subject: [PATCH] add doc-build workflows --- .github/workflows/build_documentation.yml | 19 ++++++++++++++++++ .github/workflows/build_pr_documentation.yml | 20 +++++++++++++++++++ .github/workflows/upload_pr_documentation.yml | 17 ++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 .github/workflows/build_documentation.yml create mode 100644 .github/workflows/build_pr_documentation.yml create mode 100644 .github/workflows/upload_pr_documentation.yml diff --git a/.github/workflows/build_documentation.yml b/.github/workflows/build_documentation.yml new file mode 100644 index 0000000..c5eb4bc --- /dev/null +++ b/.github/workflows/build_documentation.yml @@ -0,0 +1,19 @@ +name: Build documentation + +on: + push: + branches: + - main + +jobs: + build: + uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@main + with: + commit_sha: ${{ github.sha }} + package: diffusion-models-class + package_name: diffusion-course + path_to_docs: diffusion-models-class/ + additional_args: --not_python_module + convert_notebooks: true + secrets: + hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }} diff --git a/.github/workflows/build_pr_documentation.yml b/.github/workflows/build_pr_documentation.yml new file mode 100644 index 0000000..ad3a01a --- /dev/null +++ b/.github/workflows/build_pr_documentation.yml @@ -0,0 +1,20 @@ +name: Build PR Documentation + +on: + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + build: + uses: huggingface/doc-builder/.github/workflows/build_pr_documentation.yml@main + with: + commit_sha: ${{ github.event.pull_request.head.sha }} + pr_number: ${{ github.event.number }} + package: diffusion-models-class + package_name: diffusion-course + path_to_docs: diffusion-models-class/ + additional_args: --not_python_module + convert_notebooks: true diff --git a/.github/workflows/upload_pr_documentation.yml b/.github/workflows/upload_pr_documentation.yml new file mode 100644 index 0000000..380b7f3 --- /dev/null +++ b/.github/workflows/upload_pr_documentation.yml @@ -0,0 +1,17 @@ +name: Upload PR Documentation + +on: + workflow_run: + workflows: ["Build PR Documentation"] + types: + - completed + +jobs: + build: + uses: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml@main + with: + package_name: diffusion-course + hub_base_path: https://moon-ci-docs.huggingface.co/learn + secrets: + hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }} + comment_bot_token: ${{ secrets.COMMENT_BOT_TOKEN }} \ No newline at end of file