From 5df4c7c0d792738e0ed0fd3426770dea6d7233df Mon Sep 17 00:00:00 2001 From: Mishig Date: Fri, 11 Aug 2023 07:07:53 +0200 Subject: [PATCH] [docs] Build docs only when doc files change (#812) Build docs only when change happens in `docs/source` See for example https://github.com/huggingface/api-inference/blob/main/.github/workflows/build_documentation.yml#L3-L8 --- .github/workflows/build_documentation.yml | 2 ++ .github/workflows/build_pr_documentation.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/build_documentation.yml b/.github/workflows/build_documentation.yml index 9d130ebb..a0f1d6f1 100644 --- a/.github/workflows/build_documentation.yml +++ b/.github/workflows/build_documentation.yml @@ -2,6 +2,8 @@ name: Build documentation on: push: + paths: + - "docs/source/**" branches: - main - doc-builder* diff --git a/.github/workflows/build_pr_documentation.yml b/.github/workflows/build_pr_documentation.yml index e608c74a..b46216ec 100644 --- a/.github/workflows/build_pr_documentation.yml +++ b/.github/workflows/build_pr_documentation.yml @@ -2,6 +2,8 @@ name: Build PR Documentation on: pull_request: + paths: + - "docs/source/**" concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}