diff --git a/index.js b/index.js index a315add..fc6db28 100644 --- a/index.js +++ b/index.js @@ -94,7 +94,12 @@ class CloudfrontInvalidate { invalidate() { const cli = this.serverless.cli; - + + if (this.options.noDeploy) { + cli.consoleLog('skipping invalidation due to noDeploy option'); + return; + } + this.serverless.service.custom.cloudfrontInvalidate.forEach(element => { let cloudfrontInvalidate = element; let reference = randomstring.generate(16);