From 69434896a853ffbb09b831a438eb8b949277a96e Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Tue, 21 Nov 2023 17:52:18 +0100 Subject: [PATCH] Clean up examples first and move new in examples --- .github/workflows/ansys_lab.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ansys_lab.yml b/.github/workflows/ansys_lab.yml index 4c9c37008b..f3945719ed 100644 --- a/.github/workflows/ansys_lab.yml +++ b/.github/workflows/ansys_lab.yml @@ -34,8 +34,9 @@ jobs: import glob import os - for example in glob.glob('*.ipynb'): - os.remove(example) + for example in glob.glob('**/*.ipynb'): + os.remove(example) + print(f"Deleted {example}") - name: "Download Release Asset - HTML" uses: dsaltares/fetch-gh-release-asset@1.1.0 @@ -60,7 +61,7 @@ jobs: print(os.listdir(os.getcwd())) for folder in os.listdir(os.path.join(os.getcwd(), "_downloads")): print(os.listdir(os.path.join(os.path.join(os.getcwd(), "_downloads"), folder))) - for example in glob.glob('*.ipynb'): + for example in glob.glob('**/*.ipynb'): print(f"Moving {example}") shutil.move(example, os.path.join(os.getcwd(), "examples")) print(os.listdir(os.path.join(os.getcwd(), "examples")))