22
33on :
44 pull_request :
5- types : [opened, synchronize, reopened, ready_for_review]
5+ types : [opened, synchronize, reopened, ready_for_review, closed ]
66 branches-ignore :
77 - ' *no-ci*'
88 push :
3131jobs :
3232 debug :
3333 runs-on : ubuntu-latest
34+ if : github.event.action != 'closed'
3435 steps :
3536 - name : Show the Github context for the triggered event
3637 run : echo "$GITHUB_CONTEXT"
3940
4041 pick_server_suffix :
4142 runs-on : ubuntu-latest
43+ if : github.event.action != 'closed'
4244 outputs :
4345 suffix : ${{ steps.step1.outputs.suffix }}
4446 steps :
6971 style :
7072 name : " Style Check"
7173 runs-on : ubuntu-latest
74+ if : github.event.action != 'closed'
7275 steps :
7376 - uses : ansys/actions/code-style@v8
7477 with :
7780 build_linux1 :
7881 name : " Build linux1 wheel"
7982 runs-on : ubuntu-latest
83+ if : github.event.action != 'closed'
8084 steps :
8185 - uses : actions/checkout@v4
8286
@@ -107,6 +111,7 @@ jobs:
107111 matrix :
108112 test-any : ['false', 'true']
109113 uses : ./.github/workflows/tests.yml
114+ if : github.event.action != 'closed'
110115 needs : pick_server_suffix
111116 with :
112117 ANSYS_VERSION : ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}
@@ -121,6 +126,7 @@ jobs:
121126 docker_tests :
122127 name : " Build and Test on Docker"
123128 uses : ./.github/workflows/test_docker.yml
129+ if : github.event.action != 'closed'
124130 needs : pick_server_suffix
125131 with :
126132 ANSYS_VERSION : ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}
@@ -130,6 +136,7 @@ jobs:
130136 docker_examples :
131137 name : " Run examples on Docker"
132138 uses : ./.github/workflows/examples_docker.yml
139+ if : github.event.action != 'closed'
133140 needs : pick_server_suffix
134141 with :
135142 ANSYS_VERSION : ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}
@@ -138,7 +145,7 @@ jobs:
138145 secrets : inherit
139146
140147 docs :
141- if : startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft
148+ if : github.event.action != 'closed' && ( startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
142149 uses : ./.github/workflows/docs.yml
143150 needs : pick_server_suffix
144151 with :
@@ -148,9 +155,25 @@ jobs:
148155 python_version : " 3.11"
149156 secrets : inherit
150157
158+ doc-deploy-pr :
159+ name : " Deploy PR documentation"
160+ runs-on : ubuntu-latest
161+ needs : docs
162+ if : always() && (needs.docs.result == 'success' || needs.docs.result == 'skipped')
163+ steps :
164+ - uses : ansys/actions/doc-deploy-pr@v10
165+ with :
166+ cname : ${{ env.DOCUMENTATION_CNAME }}
167+ token : ${{ secrets.GITHUB_TOKEN }}
168+ doc-artifact-name : HTML-doc-ansys-dpf-core.zip
169+ decompress-artifact : true
170+ bot-user : ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
171+ bot-email : ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
172+ maximum-pr-doc-deployments : 10
173+
151174 upload-development-docs :
152175 runs-on : ubuntu-latest
153- if : ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' }}
176+ if : ${{ github.event.action != 'closed' && (github. ref == 'refs/heads/master' && github.event_name == 'push') }}
154177 needs : [docs]
155178 steps :
156179 - name : " Upload development documentation"
@@ -164,7 +187,7 @@ jobs:
164187 bot-email : ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
165188
166189 examples :
167- if : startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft
190+ if : github.event.action != 'closed' && ( startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
168191 uses : ./.github/workflows/examples.yml
169192 needs : pick_server_suffix
170193 with :
@@ -175,7 +198,7 @@ jobs:
175198
176199 pydpf-post :
177200 name : " PyDPF-Post"
178- if : startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft
201+ if : github.event.action != 'closed' && ( startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
179202 uses : ./.github/workflows/pydpf-post.yml
180203 needs : pick_server_suffix
181204 with :
@@ -187,7 +210,7 @@ jobs:
187210
188211 tests-retro :
189212 name : " Test DPF ${{ matrix.dpf.version }} compatibility"
190- if : startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft
213+ if : github.event.action != 'closed' && ( startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
191214 strategy :
192215 fail-fast : false
193216 matrix :
0 commit comments