From 578683992c0793231732790c8297514f2962dc3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= Date: Fri, 24 Nov 2023 22:38:53 +0100 Subject: [PATCH] ci: Fix conditional required workflows --- .github/workflows/benchmark.yaml | 1 - .../{benchmark-empty.yaml => docs-empty.yaml} | 13 ++++++++----- .github/workflows/{gh-pages.yaml => docs.yaml} | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) rename .github/workflows/{benchmark-empty.yaml => docs-empty.yaml} (71%) rename .github/workflows/{gh-pages.yaml => docs.yaml} (96%) diff --git a/.github/workflows/benchmark.yaml b/.github/workflows/benchmark.yaml index 8545ef4f4..93504b116 100644 --- a/.github/workflows/benchmark.yaml +++ b/.github/workflows/benchmark.yaml @@ -1,6 +1,5 @@ name: Benchmark Tests -# To be aware it need to be the counter-part of benchmark-empty.yaml. on: pull_request: ~ diff --git a/.github/workflows/benchmark-empty.yaml b/.github/workflows/docs-empty.yaml similarity index 71% rename from .github/workflows/benchmark-empty.yaml rename to .github/workflows/docs-empty.yaml index 2e71af531..a2d19e139 100644 --- a/.github/workflows/benchmark-empty.yaml +++ b/.github/workflows/docs-empty.yaml @@ -1,10 +1,13 @@ # Fallback workflow to be able to have the branch protection enabled at all times. -name: Empty Benchmark Tests +name: Null Docs on: - # To be aware it need to be the counter-part of benchmark.yaml. - push: - branches: [ main ] + # To be aware it need to be the counter-part of docs.yaml. + pull_request: + paths-ignore: + - doc/** + - mkdocs.yaml + - .github/workflows/docs.yaml # See https://stackoverflow.com/a/72408109 concurrency: @@ -16,7 +19,7 @@ jobs: # the protected branch rules as opposed to the tests one above which # may change regularly. validate-tests: - name: Benchmark tests status + name: Docs status runs-on: ubuntu-latest steps: - name: Successful run diff --git a/.github/workflows/gh-pages.yaml b/.github/workflows/docs.yaml similarity index 96% rename from .github/workflows/gh-pages.yaml rename to .github/workflows/docs.yaml index 897016a70..f8264c6a4 100644 --- a/.github/workflows/gh-pages.yaml +++ b/.github/workflows/docs.yaml @@ -1,4 +1,4 @@ -name: GitHub-Pages +name: Docs on: push: @@ -7,12 +7,13 @@ on: paths: - doc/** - mkdocs.yaml - - .github/workflows/gh-pages.yaml + - .github/workflows/docs.yaml + # To be aware it need to be the counter-part of docs-empty.yaml. pull_request: paths: - doc/** - mkdocs.yaml - - .github/workflows/gh-pages.yaml + - .github/workflows/docs.yaml # See https://stackoverflow.com/a/72408109 concurrency: