@@ -59,38 +59,26 @@ commands:
5959 steps :
6060 - attach_workspace :
6161 at : /tmp/dist
62- - when :
63- condition :
64- and :
65- - not :
66- equal : [ "", "${AWS_ACCESS_KEY_ID}" ]
67- - not :
68- equal : [ "", "${AWS_SECRET_ACCESS_KEY}" ]
69- steps :
70- - aws-cli/install
71- - aws-s3/sync :
72- arguments : --cache-control public,max-age=300,stale-while-revalidate=300 --exclude * --include *.html --include *.txt --include *.json --include *.md --include *.xml
73- from : /tmp/dist/s2-docs/<< parameters.dir >>
74- to : << parameters.bucket >>
75- - aws-s3/sync :
76- arguments : --cache-control public,max-age=300,stale-while-revalidate=300 --content-type text/x-component;charset=utf-8 --exclude * --include *.rsc
77- from : /tmp/dist/s2-docs/<< parameters.dir >>
78- to : << parameters.bucket >>
79- - aws-s3/sync :
80- arguments : --cache-control public,max-age=31536000,immutable --include * --exclude *.html --exclude *.rsc --exclude *.txt --exclude *.json --exclude *.md --exclude *.xml
81- from : /tmp/dist/s2-docs/<< parameters.dir >>
82- to : << parameters.bucket >>
83- - unless :
84- condition :
85- and :
86- - not :
87- equal : [ "", "${AWS_ACCESS_KEY_ID}" ]
88- - not :
89- equal : [ "", "${AWS_SECRET_ACCESS_KEY}" ]
90- steps :
91- - run :
92- name : Skip S3 deployment
93- command : echo "AWS credentials not found. Skipping S3 deployment."
62+ - aws-cli/install
63+ - run :
64+ name : Check AWS credentials
65+ command : |
66+ if [ -z "$AWS_ACCESS_KEY_ID" ] || [ -z "$AWS_SECRET_ACCESS_KEY" ]; then
67+ echo "AWS credentials not found"
68+ circleci-agent step halt
69+ fi
70+ - aws-s3/sync :
71+ arguments : --cache-control public,max-age=300,stale-while-revalidate=300 --exclude * --include *.html --include *.txt --include *.json --include *.md --include *.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 --content-type text/x-component;charset=utf-8 --exclude * --include *.rsc
76+ from : /tmp/dist/s2-docs/<< parameters.dir >>
77+ to : << parameters.bucket >>
78+ - aws-s3/sync :
79+ arguments : --cache-control public,max-age=31536000,immutable --include * --exclude *.html --exclude *.rsc --exclude *.txt --exclude *.json --exclude *.md --exclude *.xml
80+ from : /tmp/dist/s2-docs/<< parameters.dir >>
81+ to : << parameters.bucket >>
9482
9583jobs :
9684 install :
0 commit comments