Skip to content

Commit

Permalink
Disable S3 deployment when performing continuous integration
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanh committed Nov 5, 2016
1 parent 475413f commit adf56c9
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions webpack/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,19 @@ const deployPlugins = [];
if (process.env.DEPLOY) {
deployPlugins.push(new webpack.optimize.UglifyJsPlugin({compressor: {warnings: false}, comments: /(?:)/}));
deployPlugins.push(new webpack.LoaderOptionsPlugin({comments: false}));
deployPlugins.push(new S3Plugin({
s3Options: {
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
region: process.env.AWS_REGION
},
s3UploadOptions: {
Bucket: process.env.AWS_S3_BUCKET
},
}));
if (!process.env.CI) {
// do not deploy to S3 if running in continuous integration environment:
deployPlugins.push(new S3Plugin({
s3Options: {
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
region: process.env.AWS_REGION
},
s3UploadOptions: {
Bucket: process.env.AWS_S3_BUCKET
},
}));
}
}

export default {
Expand Down

0 comments on commit adf56c9

Please sign in to comment.