@@ -15,16 +15,16 @@ configure_aws_cli() {
15
15
}
16
16
17
17
deploy_s3bucket () {
18
- aws s3 sync --dryrun ${HOME} /${CIRCLE_PROJECT_REPONAME} /dist s3://${AWS_S3_BUCKET} --cache-control max-age=0,s-maxage=86400 --exclude " *.txt" --exclude " *.js" --exclude " *.css"
19
- result=` aws s3 sync ${HOME} /${CIRCLE_PROJECT_REPONAME} /dist s3://${AWS_S3_BUCKET} --cache-control max-age=0,s-maxage=86400 --exclude " *.txt" --exclude " *.js" --exclude " *.css" `
18
+ aws s3 sync --dryrun ${HOME} /project /dist s3://${AWS_S3_BUCKET} --cache-control max-age=0,s-maxage=86400 --exclude " *.txt" --exclude " *.js" --exclude " *.css"
19
+ result=` aws s3 sync ${HOME} /project /dist s3://${AWS_S3_BUCKET} --cache-control max-age=0,s-maxage=86400 --exclude " *.txt" --exclude " *.js" --exclude " *.css" `
20
20
if [ $? -eq 0 ]; then
21
21
echo " All html, font, image, map, and media files are Deployed without gzip encoding!"
22
22
else
23
23
echo " Deployment Failed - $result "
24
24
exit 1
25
25
fi
26
- aws s3 sync --dryrun ${HOME} /${CIRCLE_PROJECT_REPONAME} /dist s3://${AWS_S3_BUCKET} --cache-control max-age=0,s-maxage=86400 --exclude " *" --include " *.txt" --include " *.js" --include " *.css" --content-encoding gzip
27
- result=` aws s3 sync ${HOME} /${CIRCLE_PROJECT_REPONAME} /dist s3://${AWS_S3_BUCKET} --cache-control max-age=0,s-maxage=86400 --exclude " *" --include " *.txt" --include " *.js" --include " *.css" --content-encoding gzip`
26
+ aws s3 sync --dryrun ${HOME} /project /dist s3://${AWS_S3_BUCKET} --cache-control max-age=0,s-maxage=86400 --exclude " *" --include " *.txt" --include " *.js" --include " *.css" --content-encoding gzip
27
+ result=` aws s3 sync ${HOME} /project /dist s3://${AWS_S3_BUCKET} --cache-control max-age=0,s-maxage=86400 --exclude " *" --include " *.txt" --include " *.js" --include " *.css" --content-encoding gzip`
28
28
if [ $? -eq 0 ]; then
29
29
echo " All txt, css, and js files are Deployed! with gzip"
30
30
else
@@ -34,14 +34,17 @@ deploy_s3bucket() {
34
34
35
35
}
36
36
37
- echo -e " application/font-woff\t\t\t\twoff2" >> /etc/mime.types
38
- echo -e " application/font-sfnt\t\t\t\tttf" >> /etc/mime.types
39
- echo -e " application/json\t\t\t\tmap" >> /etc/mime.types
37
+ # sudo chmod 666 /etc/mime.types
38
+ # echo -e "application/font-woff\t\t\t\twoff2" >> /etc/mime.types
39
+ # echo -e "application/font-sfnt\t\t\t\tttf" >> /etc/mime.types
40
+ # echo -e "application/json\t\t\t\tmap" >> /etc/mime.types
41
+
40
42
41
43
cat /etc/mime.types | grep -i woff
42
44
cat /etc/mime.types | grep -i ico
43
45
cat /etc/mime.types | grep -i map
44
46
cat /etc/mime.types | grep -i ttf
47
+ cat /etc/mime.types | grep -i woff2
45
48
46
49
configure_aws_cli
47
50
deploy_s3bucket
0 commit comments