Skip to content

Commit 02e119d

Browse files
authored
fix: applying cicd improvements to geometry-mesh-fluent (#114)
1 parent a2de17b commit 02e119d

File tree

1 file changed

+6
-30
lines changed

1 file changed

+6
-30
lines changed

.github/workflows/geometry-mesh-fluent.yml

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -210,27 +210,15 @@ jobs:
210210
docker rm -f $(docker ps -a -q)
211211
fi
212212
213-
- name: (DOCS) Check if docs should be built
214-
if: (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && inputs.doc-build
215-
run: |
216-
echo "Requested to build docs..."
217-
if [ "${{ matrix.ansys-release }}" == "${{ env.ANSYS_RELEASE_FOR_DOCS }}" ]; then
218-
echo "Building docs"
219-
echo "RUN_DOC_BUILD=true" >> $GITHUB_ENV
220-
else
221-
echo "Not building docs - since not primary release"
222-
echo "RUN_DOC_BUILD=false" >> $GITHUB_ENV
223-
fi
224-
225213
- name: (DOCS) Download the docs artifacts
226214
uses: actions/download-artifact@v5
227-
if: ${{ env.RUN_DOC_BUILD == 'true' }}
215+
if: needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS
228216
with:
229217
name: geometry-mesh-fluent-docs-stage-geometry
230218
path: doc
231219

232220
- name: (DOCS) Build the documentation (only on ${{ env.ANSYS_RELEASE_FOR_DOCS}})
233-
if: ${{ env.RUN_DOC_BUILD == 'true' }}
221+
if: needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS
234222
env:
235223
FLUENT_IMAGE_TAG: v${{ matrix.ansys-release }}.0
236224
BUILD_DOCS_SCRIPT: 'geometry-mesh-fluent/wf_gmf_02_fluent_meshing.py'
@@ -241,7 +229,7 @@ jobs:
241229
make html
242230
243231
- name: (DOCS) Upload docs artifacts
244-
if: ${{ env.RUN_DOC_BUILD == 'true' }}
232+
if: needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS
245233
uses: actions/upload-artifact@v4
246234
with:
247235
name: geometry-mesh-fluent-docs-stage-mesh
@@ -330,27 +318,15 @@ jobs:
330318
docker rm -f $(docker ps -a -q)
331319
fi
332320
333-
- name: (DOCS) Check if docs should be built
334-
if: (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && inputs.doc-build
335-
run: |
336-
echo "Requested to build docs..."
337-
if [ "${{ matrix.ansys-release }}" == "${{ env.ANSYS_RELEASE_FOR_DOCS }}" ]; then
338-
echo "Building docs"
339-
echo "RUN_DOC_BUILD=true" >> $GITHUB_ENV
340-
else
341-
echo "Not building docs - since not primary release"
342-
echo "RUN_DOC_BUILD=false" >> $GITHUB_ENV
343-
fi
344-
345321
- name: (DOCS) Download the docs artifacts
346322
uses: actions/download-artifact@v5
347-
if: ${{ env.RUN_DOC_BUILD == 'true' }}
323+
if: needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS
348324
with:
349325
name: geometry-mesh-fluent-docs-stage-mesh
350326
path: doc
351327

352328
- name: (DOCS) Build the documentation (only on ${{ env.ANSYS_RELEASE_FOR_DOCS}})
353-
if: ${{ env.RUN_DOC_BUILD == 'true' }}
329+
if: needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS
354330
env:
355331
FLUENT_IMAGE_TAG: v${{ matrix.ansys-release }}.0
356332
BUILD_DOCS_SCRIPT: 'geometry-mesh-fluent/wf_gmf_03_fluent_solver.py'
@@ -360,7 +336,7 @@ jobs:
360336
make html
361337
362338
- name: (DOCS) Upload docs artifacts
363-
if: ${{ env.RUN_DOC_BUILD == 'true' }}
339+
if: needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS
364340
uses: actions/upload-artifact@v4
365341
with:
366342
name: geometry-mesh-fluent-docs

0 commit comments

Comments
 (0)