mirror of
https://github.com/thegeeklab/wp-s3-action.git
synced 2024-11-14 00:00:39 +00:00
Updating the DOCS to include examples of content_encoding
This commit is contained in:
parent
748c4417a3
commit
5f71ffd214
9
DOCS.md
9
DOCS.md
@ -9,6 +9,7 @@ Use the S3 sync plugin to synchronize files and folders with an Amazon S3 bucket
|
|||||||
* `target` - target folder in your S3 bucket
|
* `target` - target folder in your S3 bucket
|
||||||
* `delete` - deletes files in the target not found in the source
|
* `delete` - deletes files in the target not found in the source
|
||||||
* `content_type` - override default mime-types to use this value
|
* `content_type` - override default mime-types to use this value
|
||||||
|
* `content_encoding` - override default content encoding header for files
|
||||||
* `metadata` - set custom metadata
|
* `metadata` - set custom metadata
|
||||||
* `redirects` - targets that should redirect elsewhere
|
* `redirects` - targets that should redirect elsewhere
|
||||||
* `cloudfront_distribution_id` - (optional) the cloudfront distribution id to invalidate after syncing
|
* `cloudfront_distribution_id` - (optional) the cloudfront distribution id to invalidate after syncing
|
||||||
@ -29,7 +30,7 @@ publish:
|
|||||||
cloudfront_distribution_id: "9c5785d3ece6a9cdefa4"
|
cloudfront_distribution_id: "9c5785d3ece6a9cdefa4"
|
||||||
```
|
```
|
||||||
|
|
||||||
Both `acl` and `content_type` can be passed as a string value to apply to all files, or as a map to apply to a subset of files.
|
The `acl`, `content_type`, and `content_encoding` parameters can be passed as a string value to apply to all files, or as a map to apply to a subset of files.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
@ -41,6 +42,9 @@ publish:
|
|||||||
"private/*": private
|
"private/*": private
|
||||||
content_type:
|
content_type:
|
||||||
".svg": image/svg+xml
|
".svg": image/svg+xml
|
||||||
|
content_encoding:
|
||||||
|
".js": gzip
|
||||||
|
".css": gzip
|
||||||
region: "us-east-1"
|
region: "us-east-1"
|
||||||
bucket: "my-bucket.s3-website-us-east-1.amazonaws.com"
|
bucket: "my-bucket.s3-website-us-east-1.amazonaws.com"
|
||||||
access_key: "970d28f4dd477bc184fbd10b376de753"
|
access_key: "970d28f4dd477bc184fbd10b376de753"
|
||||||
@ -54,6 +58,9 @@ In the case of `acl` the key of the map is a glob. If there are no matches in yo
|
|||||||
|
|
||||||
The `content_type` field the key is an extension including the leading dot `.`. If you want to set a content type for files with no extension, set the key to the empty string `""`. If there are no matches for the `content_type` of any file, one will automatically be determined for you.
|
The `content_type` field the key is an extension including the leading dot `.`. If you want to set a content type for files with no extension, set the key to the empty string `""`. If there are no matches for the `content_type` of any file, one will automatically be determined for you.
|
||||||
|
|
||||||
|
In the `content_encoding` field the key is an extension including the leading dot `.`. If you want to set a encoding type for files with no extension, set the key
|
||||||
|
to th empty string `""`. If there are no matches for the `content_encoding` of a file, no content-encoding header will be added.
|
||||||
|
|
||||||
The `metadata` field can be set as either an object where the keys are the metadata headers:
|
The `metadata` field can be set as either an object where the keys are the metadata headers:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
Loading…
Reference in New Issue
Block a user