From 5ed8934a7499373b51337042f7e11b5f7599d7dc Mon Sep 17 00:00:00 2001 From: Nicola Reggiani Date: Thu, 7 Jul 2022 23:47:25 +0200 Subject: [PATCH] Version bump --- dist/index.js | 8 +++++--- package.json | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index c798a4c..1967f32 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1043,8 +1043,9 @@ async function run() { const noCache = getBooleanInput('no-cache'); const private = getBooleanInput('private'); const cache = core.getInput('cache') || null; + const filesToInclude = core.getInput('files-to-include') || null; - await deploy({ folder, bucket, bucketRegion, distId, invalidation, deleteRemoved, noCache, private, cache }); + await deploy({ folder, bucket, bucketRegion, distId, invalidation, deleteRemoved, noCache, private, cache, filesToInclude }); } catch (error) { core.setFailed(error.message); } @@ -1077,7 +1078,7 @@ const exec = __webpack_require__(986); let deploy = function (params) { return new Promise((resolve, reject) => { - const { folder, bucket, bucketRegion, distId, invalidation, deleteRemoved, noCache, private, cache } = params; + const { folder, bucket, bucketRegion, distId, invalidation, deleteRemoved, noCache, private, cache, filesToInclude } = params; const distIdArg = distId ? `--distId ${distId}` : ''; const invalidationArg = distId ? `--invalidate "${invalidation}"` : ''; @@ -1090,9 +1091,10 @@ let deploy = function (params) { const noCacheArg = noCache ? '--noCache' : ''; const privateArg = private ? '--private' : ''; const cacheFlag = cache ? `--cache ${cache}` : ''; + const filesRegex = filesToInclude ? filesToInclude : '**'; try { - const command = `npx s3-deploy@1.4.0 ./** \ + const command = `npx s3-deploy@1.4.0 ./${filesRegex} \ --bucket ${bucket} \ --region ${bucketRegion} \ --cwd ./ \ diff --git a/package.json b/package.json index 6c9dc54..c437eac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "github-action-s3-deploy", - "version": "3.1.1", + "version": "3.2.0", "description": "Easily deploy a static website to AWS S3 and invalidate CloudFront distribution", "main": "index.js", "scripts": {