Skip to content

Commit c586a04

Browse files
committed
Deploy to s3
1 parent 5ae99f8 commit c586a04

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.circleci/config.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ parameters:
1313
type: string
1414
default: ""
1515

16+
orbs:
17+
aws-cli: circleci/[email protected]
18+
aws-s3: circleci/[email protected]
19+
1620
executors:
1721
rsp:
1822
docker:
@@ -822,6 +826,25 @@ jobs:
822826
azcopy copy "/tmp/dist/production/docs/*" "https://reactspectrum.blob.core.windows.net/\$web${AZURE_STORAGE_SAS_TOKEN}" --recursive --include-pattern "*.html" --content-type "text/html; charset=utf-8" --cache-control "max-age=300"
823827
azcopy copy "/tmp/dist/production/docs/*" "https://reactspectrum.blob.core.windows.net/\$web${AZURE_STORAGE_SAS_TOKEN}" --recursive --include-pattern "*.rsc" --content-type "text/x-component; charset=utf-8" --cache-control "max-age=300"
824828
829+
deploy-s3:
830+
executor: rsp
831+
steps:
832+
- attach_workspace:
833+
at: /tmp/dist
834+
- aws-cli/install
835+
- aws-s3/sync:
836+
arguments: --cache-control public,max-age=300,stale-while-revalidate=300 --include *.{html,txt,json,md}
837+
from: /tmp/dist/production/docs
838+
to: s3://react-spectrum-prod
839+
- aws-s3/sync:
840+
arguments: --cache-control public,max-age=300,stale-while-revalidate=300 --content-type text/x-component;charset=utf-8 --include *.rsc
841+
from: /tmp/dist/production/docs
842+
to: s3://react-spectrum-prod
843+
- aws-s3/sync:
844+
arguments: --exclude *.{html,rsc,txt,json,md}
845+
from: /tmp/dist/production/docs
846+
to: s3://react-spectrum-prod
847+
825848
comment:
826849
executor: rsp
827850
steps:
@@ -1054,6 +1077,12 @@ workflows:
10541077
only: beta-docs
10551078
requires:
10561079
- docs-beta
1080+
- deploy-s3:
1081+
filters:
1082+
branches:
1083+
only: beta-docs
1084+
requires:
1085+
- docs-beta
10571086

10581087
nightly:
10591088
triggers:

0 commit comments

Comments
 (0)