<commit_before>Use the S3 sync plugin to synchronize files and folders with an Amazon S3 bucket. The following parameters are used to configure this plugin:

* `access_key` - amazon key
* `secret_key` - amazon secret key
* `bucket` - bucket name
* `region` - bucket region (`us-east-1`, `eu-west-1`, etc)
* `acl` - access to files that are uploaded (`private`, `public-read`, etc)
* `source` - location of folder to sync
* `target` - target folder in your S3 bucket
* `delete` - deletes files in the target not found in the source
* `content_type` - override default mime-types to use this value
* `metadata` - set custom metadata
* `redirects` - targets that should redirect elsewhere
* `cloudfront_distribution_id` - (optional) the cloudfront distribution id to invalidate after syncing

The following is a sample S3 configuration in your .drone.yml file:

```yaml
publish:
  s3_sync:
    acl: public-read
    region: "us-east-1"
    bucket: "my-bucket.s3-website-us-east-1.amazonaws.com"
    access_key: "<KEY>"
    secret_key: "9c5785d3ece6a9cdefa42eb99b58986f9095ff1c"
    source: folder/to/archive
    target: /target/location
    delete: true
    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.

For example:

```yaml
publish:
  s3_sync:
    acl:
      "public/*": public-read
      "private/*": private
    content_type:
      ".svg": image/svg+xml
    region: "us-east-1"
    bucket: "my-bucket.s3-website-us-east-1.<EMAIL>.<EMAIL>"
    access_key: "<KEY>"
    secret_key: "9c5785d3ece6a9cdefa42eb99b58986f9095ff1c"
    source: folder/to/archive
    target: /target/location
    delete: true
```

In the case of `acl` the key of the map is a glob. If there are no matches in your settings for a given file, the default is `"private"`.

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.
<commit_msg>Updating the DOCS to include examples of content_encoding<commit_after>Use the S3 sync plugin to synchronize files and folders with an Amazon S3 bucket. The following parameters are used to configure this plugin:

* `access_key` - amazon key
* `secret_key` - amazon secret key
* `bucket` - bucket name
* `region` - bucket region (`us-east-1`, `eu-west-1`, etc)
* `acl` - access to files that are uploaded (`private`, `public-read`, etc)
* `source` - location of folder to sync
* `target` - target folder in your S3 bucket
* `delete` - deletes files in the target not found in the source
* `content_type` - override default mime-types to use this value
* `content_encoding` - override default content encoding header for files
* `metadata` - set custom metadata
* `redirects` - targets that should redirect elsewhere
* `cloudfront_distribution_id` - (optional) the cloudfront distribution id to invalidate after syncing

The following is a sample S3 configuration in your .drone.yml file:

```yaml
publish:
  s3_sync:
    acl: public-read
    region: "us-east-1"
    bucket: "my-bucket.s3-website-us-east-1.amazonaws.com"
    access_key: "<KEY>"
    secret_key: "9c5785d3ece6a9cdefa42eb99b58986f9095ff1c"
    source: folder/to/archive
    target: /target/location
    delete: true
    cloudfront_distribution_id: "9c5785d3ece6a9cdefa4"
```

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:

```yaml
publish:
  s3_sync:
    acl:
      "public/*": public-read
      "private/*": private
    content_type:
      ".svg": image/svg+xml
    content_encoding:
      ".js": gzip
      ".css": gzip
    region: "us-east-1"
    bucket: "my-bucket.s3-website-us-east-1.amazonaws.com"
    access_key: "<KEY>"
    secret_key: "9c5785d3ece6a9cdefa42eb99b58986f9095ff1c"
    source: folder/to/archive
    target: /target/location
    delete: true
```

In the case of `acl` the key of the map is a glob. If there are no matches in your settings for a given file, the default is `"private"`.

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.

{'fraction_non_alphanumeric': 0.09588477366255144, 'fraction_numerical': 0.02757201646090535, 'mean_word_length': 3.76101860920666, 'pattern_counts': {'":': 8, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6006550', 'n_tokens_mistral': 1582, 'n_tokens_neox': 1507, 'n_words': 606}