Skip to content

Commit d1745ac

Browse files
committed
Only build documentation if files under docs folder changed
1 parent 240492d commit d1745ac

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.circleci/config.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
# - ubu: ubuntu
77
# - ems: Emscripten
88
version: 2.1
9+
10+
setup: true
11+
912
parameters:
1013
ubuntu-2004-docker-image:
1114
type: string
@@ -35,9 +38,15 @@ parameters:
3538
evm-version:
3639
type: string
3740
default: prague
41+
# Path filtering parameters
42+
# Documentation workflow
43+
run-docs-workflow:
44+
type: boolean
45+
default: false
3846

3947
orbs:
4048
win: circleci/[email protected]
49+
path-filtering: circleci/[email protected]
4150

4251
commands:
4352
matrix_notify_unless_pr:
@@ -1872,6 +1881,20 @@ jobs:
18721881
workflows:
18731882
version: 2
18741883

1884+
setup:
1885+
jobs:
1886+
- path-filtering/filter:
1887+
name: filter-docs
1888+
mapping: |
1889+
docs/.* run-docs-workflow true
1890+
base-revision: develop
1891+
config-path: .circleci/config.yml
1892+
1893+
docs:
1894+
when: << pipeline.parameters.run-docs-workflow >>
1895+
jobs:
1896+
- b_docs: *requires_nothing
1897+
18751898
main:
18761899
jobs:
18771900
# basic checks
@@ -1887,8 +1910,6 @@ workflows:
18871910
- t_ubu_pyscripts: *requires_nothing
18881911
- t_win_pyscripts: *requires_nothing
18891912

1890-
# build-only
1891-
- b_docs: *requires_nothing
18921913
- b_ubu_ossfuzz: *requires_nothing
18931914
- b_ubu_2204: *requires_nothing
18941915
- b_ubu_2204_clang: *requires_nothing

0 commit comments

Comments
 (0)