@@ -21,7 +21,16 @@ concurrency:
21
21
cancel-in-progress : true
22
22
23
23
env :
24
- USE_CACHE : ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.cache == 'true') || (github.event_name == 'pull_request') || (github.event_name == 'push') }}
24
+ USE_CACHE : ${{
25
+ (
26
+ (github.event_name == 'workflow_dispatch' && github.event.inputs.cache == 'true') ||
27
+ (github.event_name == 'pull_request') ||
28
+ (github.event_name == 'push')
29
+ ) &&
30
+ !startsWith(github.ref, 'refs/tags/v') &&
31
+ !startsWith(github.ref, 'refs/heads/release/') &&
32
+ !startsWith(github.ref, 'refs/heads/main')
33
+ }}
25
34
PYDEVD_DISABLE_FILE_VALIDATION : " 1"
26
35
PYTEST_ADDOPTS : " --color=yes"
27
36
FORCE_COLOR : " True"
@@ -66,21 +75,21 @@ jobs:
66
75
67
76
- name : Cache Sphinx-Gallery Examples
68
77
uses : actions/cache@v4
69
- if : env.USE_CACHE == 'true' && !startsWith(github.ref, 'refs/heads/release/') && !startsWith(github.ref, 'refs/tags/v') && (! github.event_name == 'pull_request' || ! contains(github.event.pull_request.labels.*.name, 'no-gallery-cache'))
78
+ if : env.USE_CACHE == 'true' && (! github.event_name == 'pull_request' || ! contains(github.event.pull_request.labels.*.name, 'no-gallery-cache'))
70
79
with :
71
80
path : doc/source/examples/
72
81
key : doc-examples-${{ hashFiles('pyvista/_version.py') }}
73
82
74
83
- name : Cache example data
75
84
uses : actions/cache@v4
76
- if : env.USE_CACHE == 'true' && !startsWith(github.ref, 'refs/heads/release/') && !startsWith(github.ref, 'refs/tags/v') && (! github.event_name == 'pull_request' || ! contains(github.event.pull_request.labels.*.name, 'no-example-data-cache'))
85
+ if : env.USE_CACHE == 'true' && (! github.event_name == 'pull_request' || ! contains(github.event.pull_request.labels.*.name, 'no-example-data-cache'))
77
86
with :
78
87
path : ${{ env.PYVISTA_EXAMPLE_DATA_PATH }}
79
88
key : example-data-1-${{ hashFiles('pyvista/_version.py') }}
80
89
81
90
- name : Cache Sphinx build directory
82
91
uses : actions/cache@v4
83
- if : env.USE_CACHE == 'true' && !startsWith(github.ref, 'refs/heads/release/') && !startsWith(github.ref, 'refs/tags/v') && (! github.event_name == 'pull_request' || ! contains(github.event.pull_request.labels.*.name, 'no-sphinx-build-cache'))
92
+ if : env.USE_CACHE == 'true' && (! github.event_name == 'pull_request' || ! contains(github.event.pull_request.labels.*.name, 'no-sphinx-build-cache'))
84
93
with :
85
94
path : doc/_build/
86
95
key : doc-examples-${{ hashFiles('pyvista/_version.py') }}
0 commit comments