Skip to content

Commit 03d3a5d

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

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

.circleci/config.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,19 @@ parameters:
3535
evm-version:
3636
type: string
3737
default: prague
38+
# Path filtering parameters
39+
# Main workflow
40+
run-workflow:
41+
type: boolean
42+
default: true
43+
# Documentation workflow
44+
run-docs-workflow:
45+
type: boolean
46+
default: false
3847

3948
orbs:
4049
win: circleci/[email protected]
50+
path-filtering: circleci/[email protected]
4151

4252
commands:
4353
matrix_notify_unless_pr:
@@ -1872,7 +1882,23 @@ jobs:
18721882
workflows:
18731883
version: 2
18741884

1885+
setup:
1886+
when: << pipeline.parameters.run-workflow >>
1887+
jobs:
1888+
- path-filtering/filter:
1889+
name: filter-docs
1890+
mapping: |
1891+
docs/.* run-docs-workflow true
1892+
base-revision: develop
1893+
config-path: .circleci/config.yml
1894+
1895+
docs:
1896+
when: << pipeline.parameters.run-docs-workflow >>
1897+
jobs:
1898+
- b_docs: *requires_nothing
1899+
18751900
main:
1901+
when: << pipeline.parameters.run-workflow >>
18761902
jobs:
18771903
# basic checks
18781904
- chk_spelling: *requires_nothing
@@ -1887,8 +1913,6 @@ workflows:
18871913
- t_ubu_pyscripts: *requires_nothing
18881914
- t_win_pyscripts: *requires_nothing
18891915

1890-
# build-only
1891-
- b_docs: *requires_nothing
18921916
- b_ubu_ossfuzz: *requires_nothing
18931917
- b_ubu_2204: *requires_nothing
18941918
- b_ubu_2204_clang: *requires_nothing

0 commit comments

Comments
 (0)