22
33on :
44 pull_request :
5- types : [opened, synchronize, reopened, ready_for_review, closed]
5+ types : [opened, synchronize, reopened, ready_for_review, closed, labeled ]
66 branches-ignore :
77 - ' *no-ci*'
88 push :
4040
4141 pick_server_suffix :
4242 runs-on : ubuntu-latest
43- if : github.event.action != 'closed'
43+ if : github.event.action != 'closed' && (github.event.action != 'labeled' || github.event.label.name == 'deploy-pr-doc')
4444 outputs :
4545 suffix : ${{ steps.step1.outputs.suffix }}
4646 steps :
7171 style :
7272 name : " Style Check"
7373 runs-on : ubuntu-latest
74- if : github.event.action != 'closed'
74+ if : github.event.action != 'closed' && (github.event.action != 'labeled' || github.event.label.name == 'deploy-pr-doc')
7575 steps :
7676 - uses : ansys/actions/code-style@v8
7777 with :
8080 build_linux1 :
8181 name : " Build linux1 wheel"
8282 runs-on : ubuntu-latest
83- if : github.event.action != 'closed'
83+ if : github.event.action != 'closed' && (github.event.action != 'labeled' || github.event.label.name == 'deploy-pr-doc')
8484 steps :
8585 - uses : actions/checkout@v4
8686
@@ -111,7 +111,7 @@ jobs:
111111 matrix :
112112 test-any : ['false', 'true']
113113 uses : ./.github/workflows/tests.yml
114- if : github.event.action != 'closed'
114+ if : github.event.action != 'closed' && (github.event.action != 'labeled' || github.event.label.name == 'deploy-pr-doc')
115115 needs : pick_server_suffix
116116 with :
117117 ANSYS_VERSION : ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}
@@ -126,7 +126,7 @@ jobs:
126126 docker_tests :
127127 name : " Build and Test on Docker"
128128 uses : ./.github/workflows/test_docker.yml
129- if : github.event.action != 'closed'
129+ if : github.event.action != 'closed' && (github.event.action != 'labeled' || github.event.label.name == 'deploy-pr-doc')
130130 needs : pick_server_suffix
131131 with :
132132 ANSYS_VERSION : ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}
@@ -136,7 +136,7 @@ jobs:
136136 docker_examples :
137137 name : " Run examples on Docker"
138138 uses : ./.github/workflows/examples_docker.yml
139- if : github.event.action != 'closed'
139+ if : github.event.action != 'closed' && (github.event.action != 'labeled' || github.event.label.name == 'deploy-pr-doc')
140140 needs : pick_server_suffix
141141 with :
142142 ANSYS_VERSION : ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}
@@ -145,7 +145,10 @@ jobs:
145145 secrets : inherit
146146
147147 docs :
148- if : github.event.action != 'closed' && (startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
148+ if : |
149+ github.event.action != 'closed' &&
150+ (github.event.action != 'labeled' || github.event.label.name == 'deploy-pr-doc') &&
151+ (startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
149152 uses : ./.github/workflows/docs.yml
150153 needs : pick_server_suffix
151154 with :
@@ -159,7 +162,11 @@ jobs:
159162 name : " Deploy PR documentation"
160163 runs-on : ubuntu-latest
161164 needs : docs
162- if : always() && (needs.docs.result == 'success' || needs.docs.result == 'skipped')
165+ if : |
166+ always() &&
167+ github.event.pull_request.draft != true &&
168+ (needs.docs.result == 'success' || needs.docs.result == 'skipped') &&
169+ contains(github.event.pull_request.labels.*.name, 'deploy-pr-doc')
163170 steps :
164171 - uses : ansys/actions/doc-deploy-pr@v10
165172 with :
@@ -173,7 +180,10 @@ jobs:
173180
174181 upload-development-docs :
175182 runs-on : ubuntu-latest
176- if : ${{ github.event.action != 'closed' && (github.ref == 'refs/heads/master' && github.event_name == 'push') }}
183+ if : |
184+ github.event.action != 'closed' &&
185+ (github.event.action != 'labeled' || github.event.label.name == 'deploy-pr-doc') &&
186+ (github.ref == 'refs/heads/master' && github.event_name == 'push')
177187 needs : [docs]
178188 steps :
179189 - name : " Upload development documentation"
@@ -187,7 +197,10 @@ jobs:
187197 bot-email : ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
188198
189199 examples :
190- if : github.event.action != 'closed' && (startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
200+ if : |
201+ github.event.action != 'closed' &&
202+ (github.event.action != 'labeled' || github.event.label.name == 'deploy-pr-doc') &&
203+ (startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
191204 uses : ./.github/workflows/examples.yml
192205 needs : pick_server_suffix
193206 with :
@@ -198,7 +211,10 @@ jobs:
198211
199212 pydpf-post :
200213 name : " PyDPF-Post"
201- if : github.event.action != 'closed' && (startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
214+ if : |
215+ github.event.action != 'closed' &&
216+ (github.event.action != 'labeled' || github.event.label.name == 'deploy-pr-doc') &&
217+ (startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
202218 uses : ./.github/workflows/pydpf-post.yml
203219 needs : pick_server_suffix
204220 with :
@@ -210,7 +226,10 @@ jobs:
210226
211227 tests-retro :
212228 name : " Test DPF ${{ matrix.dpf.version }} compatibility"
213- if : github.event.action != 'closed' && (startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
229+ if : |
230+ github.event.action != 'closed' &&
231+ (github.event.action != 'labeled' || github.event.label.name == 'deploy-pr-doc') &&
232+ (startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
214233 strategy :
215234 fail-fast : false
216235 matrix :
0 commit comments