@@ -15,16 +15,16 @@ configure_aws_cli() {
1515}
1616
1717deploy_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" `
2020 if [ $? -eq 0 ]; then
2121 echo " All html, font, image, map, and media files are Deployed without gzip encoding!"
2222 else
2323 echo " Deployment Failed - $result "
2424 exit 1
2525 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`
2828 if [ $? -eq 0 ]; then
2929 echo " All txt, css, and js files are Deployed! with gzip"
3030 else
@@ -34,14 +34,17 @@ deploy_s3bucket() {
3434
3535}
3636
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+
4042
4143cat /etc/mime.types | grep -i woff
4244cat /etc/mime.types | grep -i ico
4345cat /etc/mime.types | grep -i map
4446cat /etc/mime.types | grep -i ttf
47+ cat /etc/mime.types | grep -i woff2
4548
4649configure_aws_cli
4750deploy_s3bucket
0 commit comments