Skip to content

Commit da6ce97

Browse files
author
Michael Kaiser
committed
clean node-modules after success
1 parent 02e0ec0 commit da6ce97

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/build-pull-request.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,15 @@ jobs:
126126
# Check the exit status of parallel
127127
parallel_exit=$?
128128
129+
# If parallel succeeded, clean up node_modules to save space
130+
if [ $parallel_exit -eq 0 ]; then
131+
echo "::group::Cleaning up node_modules"
132+
# Find all node_modules directories within the language directory and remove them
133+
find ./ -name "node_modules" -type d -prune -exec rm -rf {} \; 2>/dev/null || true
134+
echo "Cleanup completed"
135+
echo "::endgroup::"
136+
fi
137+
129138
# If parallel failed, make sure the workflow fails too
130139
if [ $parallel_exit -ne 0 ]; then
131140
echo "::error::One or more builds failed. See error details above."

0 commit comments

Comments
 (0)