Skip to content

Commit fc24857

Browse files
committed
keep dir structure in zip
1 parent 7d9b321 commit fc24857

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/deploy-to-lambda.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,13 @@ jobs:
3737
- name: Build zip
3838
run: |
3939
hatch build -t zipped-directory
40+
dist_dir="dist/"
41+
zip_file=$(find "$dist_dir" -type f -name "*.zip" -print -quit)
42+
build_file=$(realpath "$zip_file")
43+
echo "Zip file found: $build_file"
4044
HATCH_SITE_PACKAGES_DIR=$(hatch env find)/lib/python3.12/site-packages
41-
pattern="dist/*.zip"
42-
dist_files=( $pattern )
43-
zip -r ${files[0]} $HATCH_SITE_PACKAGES_DIR
45+
cd $HATCH_SITE_PACKAGES_DIR
46+
zip -r $build_file *
4447
shell: bash
4548

4649
- name: Publish to Github

0 commit comments

Comments
 (0)