Skip to content

Commit

Permalink
Version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Reggionick committed Nov 28, 2020
1 parent 597e018 commit d78e6b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,8 @@ let deploy = function (params) {
return new Promise((resolve, reject) => {
const { folder, bucket, bucketRegion, distId, invalidation, deleteRemoved, noCache, private } = params;

const distIdArg = distId ? `--distId ${distId}` : '';
const invalidationArg = distId ? `--invalidate "${invalidation}"` : '';
const deleteRemovedArg =
deleteRemoved && !/false/i.test(deleteRemoved)
? /true/i.test(deleteRemoved)
Expand All @@ -1082,7 +1084,6 @@ let deploy = function (params) {
: '';
const noCacheArg = noCache ? '--noCache' : '';
const privateArg = private ? '--private' : '';
const distIdArg = distId ? `--distId ${distId}` : '';

try {
const command = `npx s3-deploy@1.4.0 ./** \
Expand All @@ -1092,7 +1093,7 @@ let deploy = function (params) {
${distIdArg} \
--etag \
--gzip xml,html,htm,js,css,ttf,otf,svg,txt \
--invalidate "${invalidation}" \
${invalidationArg} \
${deleteRemovedArg} \
${noCacheArg} \
${privateArg} `;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "github-action-s3-deploy",
"version": "3.0.0",
"version": "3.1.0",
"description": "Easily deploy a static website to AWS S3 and invalidate CloudFront distribution",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit d78e6b5

Please sign in to comment.