Skip to content

Commit 6d9ec15

Browse files
committed
[CI] Run DocsBuild only when needed
Oftentimes pushes to branches and PRs doesn't change anything in docs/ or include/ directories which influence the documentation build. This job takes ca. 1 minute to run with each push, so it's optimal to run it only when relevant changes were made. Also, there is no need for other pr_push jobs to wait for docs to build. Developer can work on the docs and project build/tests in any order.
1 parent fa2206a commit 6d9ec15

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

.github/workflows/docs_pr_push.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Documentation PR/push
2+
# debug
3+
on:
4+
push:
5+
branches-ignore:
6+
- 'dependabot/**'
7+
- 'main' # Ignore main branch as it's handled by docs.yml
8+
paths:
9+
- 'docs/**'
10+
- 'include/**'
11+
pull_request:
12+
paths:
13+
- 'docs/**'
14+
- 'include/**'
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
18+
cancel-in-progress: true
19+
20+
permissions:
21+
contents: read
22+
23+
jobs:
24+
DocsBuild:
25+
uses: ./.github/workflows/reusable_docs_build.yml

.github/workflows/pr_push.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ permissions:
1818
jobs:
1919
CodeChecks:
2020
uses: ./.github/workflows/reusable_checks.yml
21-
DocsBuild:
22-
uses: ./.github/workflows/reusable_docs_build.yml
2321
FastBuild:
2422
name: Fast builds
25-
needs: [CodeChecks, DocsBuild]
23+
needs: [CodeChecks]
2624
uses: ./.github/workflows/reusable_fast.yml
2725
Build:
2826
name: Basic builds

0 commit comments

Comments
 (0)