-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
95a4bd6
commit 5ed8934
Showing
2 changed files
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 [email protected] ./** \ | ||
const command = `npx [email protected] ./${filesRegex} \ | ||
--bucket ${bucket} \ | ||
--region ${bucketRegion} \ | ||
--cwd ./ \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters