Skip to content

Commit

Permalink
Version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Reggionick committed Jul 7, 2022
1 parent 95a4bd6 commit 5ed8934
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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}"` : '';
Expand All @@ -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 ./ \
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.1.1",
"version": "3.2.0",
"description": "Easily deploy a static website to AWS S3 and invalidate CloudFront distribution",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 5ed8934

Please sign in to comment.