Skip to content

Commit

Permalink
Upload build output using parallel threads
Browse files Browse the repository at this point in the history
## What it solves

Identical to safe-global/safe-docs#680 and safe-global/safe-homepage#541, this fix aims to drastically reduce deployment times to AWS.

## How this PR fixes it

The issue is solved by uploading files in parallel using the `&` operator.
  • Loading branch information
louis-md authored Jan 28, 2025
1 parent 8239106 commit 1a459e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/web/scripts/github/s3_upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ aws s3 sync . $BUCKET --delete

# Upload all HTML files again but w/o an extention so that URLs like /welcome open the right page
for file in $(find . -name '*.html' | sed 's|^\./||'); do
aws s3 cp ${file%} $BUCKET/${file%.*} --content-type 'text/html'
aws s3 cp ${file%} $BUCKET/${file%.*} --content-type 'text/html' &
done

wait

cd -

0 comments on commit 1a459e5

Please sign in to comment.