Hey all. For some reason Hugo “deploy” to aws doesn’t seem to be working correctly. I’m guessing I have the syntax wrong but not sure. When I look at the files in s3 it appears files aren’t being gzipped and the cacheControl headers aren’t being set.
I’m including my settings below.
deployment:
targets:
- name: production
URL: "s3://rest-here"
cloudFrontDistributionID: ID-here
matchers:
- pattern: "^.+\\.(html)$"
cacheControl: "max-age=2592000, private"
contentType: "text/html; charset=utf-8"
gzip: true
matchers:
- pattern: "^.+\\.(css)$"
cacheControl: "max-age=1209600, public"
contentType: "text/css; charset=utf-8"
gzip: true
matchers:
- pattern: "^main\\.(js)$"
cacheControl: "max-age=604800, private"
contentType: "text/javascript; charset=utf-8"
gzip: true
matchers:
- pattern: "^.+\\.(xml)$"
contentType: "application/xml; charset=utf-8"
gzip: true
matchers:
- pattern: "^json\\.webmanifest$"
cacheControl: "max-age=604800, public"
contentType: "application/manifest+json; charset=utf-8"
gzip: true
matchers:
- pattern: "^.+\\.(webp|avif)$"
cacheControl: "max-age=2592000, no-transform, public"
gzip: false
matchers:
- pattern: "^.+\\.(woff2)$"
cacheControl: "max-age=2592000, no-transform, public"
contentType: "font/woff2"
gzip: false