Skip to content

Commit 1a6f8c3

Browse files
authored
use copy instead of sync for aws deploy (#9339)
1 parent 3d7bc7f commit 1a6f8c3

File tree

1 file changed

+22
-12
lines changed

1 file changed

+22
-12
lines changed

.circleci/config.yml

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,28 @@ commands:
6767
echo "AWS credentials not found"
6868
circleci-agent step halt
6969
fi
70-
- aws-s3/sync:
71-
arguments: --cache-control public,max-age=31536000,immutable --include * --exclude *.html --exclude *.rsc --exclude *.txt --exclude *.json --exclude *.md --exclude *.xml
72-
from: /tmp/dist/s2-docs/<< parameters.dir >>
73-
to: << parameters.bucket >>
74-
- aws-s3/sync:
75-
arguments: --cache-control public,max-age=300,stale-while-revalidate=300 --exclude * --include *.html --include *.txt --include *.json --include *.md --include *.xml
76-
from: /tmp/dist/s2-docs/<< parameters.dir >>
77-
to: << parameters.bucket >>
78-
- aws-s3/sync:
79-
arguments: --cache-control public,max-age=300,stale-while-revalidate=300 --content-type text/x-component;charset=utf-8 --exclude * --include *.rsc
80-
from: /tmp/dist/s2-docs/<< parameters.dir >>
81-
to: << parameters.bucket >>
70+
- run:
71+
name: Configure AWS CLI for concurrent requests
72+
command: aws configure set default.s3.max_concurrent_requests 100
73+
- run:
74+
name: Copy immutable assets to S3
75+
command: |
76+
aws s3 cp /tmp/dist/s2-docs/<< parameters.dir >> << parameters.bucket >> --recursive \
77+
--cache-control "public,max-age=31536000,immutable" \
78+
--exclude "*.html" --exclude "*.rsc" --exclude "*.txt" --exclude "*.json" --exclude "*.md" --exclude "*.xml"
79+
- run:
80+
name: Copy HTML and text files to S3
81+
command: |
82+
aws s3 cp /tmp/dist/s2-docs/<< parameters.dir >> << parameters.bucket >> --recursive \
83+
--cache-control "public,max-age=300,stale-while-revalidate=300" \
84+
--exclude "*" --include "*.html" --include "*.txt" --include "*.json" --include "*.md" --include "*.xml"
85+
- run:
86+
name: Copy RSC files to S3
87+
command: |
88+
aws s3 cp /tmp/dist/s2-docs/<< parameters.dir >> << parameters.bucket >> --recursive \
89+
--cache-control "public,max-age=300,stale-while-revalidate=300" \
90+
--content-type "text/x-component;charset=utf-8" \
91+
--exclude "*" --include "*.rsc"
8292
8393
jobs:
8494
install:

0 commit comments

Comments
 (0)