diff --git a/deploy.sh b/deploy.sh index 8923f6b..ca1a0cf 100755 --- a/deploy.sh +++ b/deploy.sh @@ -157,8 +157,12 @@ svn commit -m "Update to version $VERSION from GitHub" --no-auth-cache --non-int if $INPUT_GENERATE_ZIP; then echo "Generating zip file..." - cd "$SVN_DIR/trunk" || exit - zip -r "${GITHUB_WORKSPACE}/${SLUG}.zip" . + + # use a symbolic link so the directory in the zip matches the slug + ln -s "${SVN_DIR}/trunk" "${SVN_DIR}/${SLUG}" + zip -r "${GITHUB_WORKSPACE}/${SLUG}.zip" "$SLUG" + unlink "${SVN_DIR}/${SLUG}" + echo "zip-path=${GITHUB_WORKSPACE}/${SLUG}.zip" >> "${GITHUB_OUTPUT}" echo "✓ Zip file generated!" fi