diff --git a/.github/labels.yml b/.github/labels.yml index 5120cd7a0..08b6c08bb 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -108,4 +108,8 @@ - name: skip-test description: Skips the test job in CI - color: e4e669 \ No newline at end of file + color: e4e669 + +- name: deploy-pr-doc + description: Triggers PR documentation deployment in CI + color: 0075ca \ No newline at end of file diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 25c87aeba..2a4af2730 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -152,7 +152,10 @@ jobs: name: "Deploy PR documentation" runs-on: ubuntu-latest needs: [docs] - if: always() && needs.docs.result == 'success' + if: | + always() && + needs.docs.result == 'success' && + contains(github.event.pull_request.labels.*.name, 'deploy-pr-doc') permissions: contents: write # Required to push documentation to gh-pages branch pull-requests: write # Needed to comment on PR with documentation link diff --git a/doc/changelog.d/1651.added.md b/doc/changelog.d/1651.added.md new file mode 100644 index 000000000..6fe74c5f2 --- /dev/null +++ b/doc/changelog.d/1651.added.md @@ -0,0 +1 @@ +Add doc-deploy-pr label so that it only runs if label is enabled