diff --git a/.github/workflows/generate-index.yml b/.github/workflows/generate-index.yml index 377c9fba..3c23012b 100644 --- a/.github/workflows/generate-index.yml +++ b/.github/workflows/generate-index.yml @@ -76,7 +76,9 @@ jobs: run: gzip --keep boards/module_firmware_index.json - name: s3 sync - run: ./s3Copy.sh . s3://arduino-downloads-prod-beagle/arduino-fwuploader + run: | + aws s3 sync boards/ s3://${{ secrets.DOWNLOADS_BUCKET }}/arduino-fwuploader/boards + aws s3 sync firmwares/ s3://${{ secrets.DOWNLOADS_BUCKET }}/arduino-fwuploader/firmwares env: AWS_REGION: "us-east-1" # or https://github.com/aws/aws-cli/issues/5623 AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/generator/s3Copy.sh b/generator/s3Copy.sh deleted file mode 100755 index fc6f78a2..00000000 --- a/generator/s3Copy.sh +++ /dev/null @@ -1,11 +0,0 @@ -path=$1 # the path of the directory where the files and directories that need to be copied are located -s3Dir=$2 # the s3 bucket path - -for entry in "$path"/*; do - name=`echo $entry | sed 's/.*\///'` # getting the name of the file or directory - if [[ -d $entry ]]; then # if it is a directory - aws s3 cp --recursive "$name" "$s3Dir/$name/" - else # if it is a file - aws s3 cp "$name" "$s3Dir/" --exclude "generator.py" --exclude "raw_boards.json" --exclude "s3Copy.sh" - fi -done