diff --git a/README.md b/README.md index acc9db1..8181575 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# hexo-deployer-s3 +# hexo-deployer-s3 Amazon S3 deployer plugin for [Hexo](http://hexo.io/) @@ -17,8 +17,8 @@ You can configure this plugin in `_config.yml`. deploy: type: s3 bucket: - aws_key: // Optional, if the environment variable `AWS_KEY` is set - aws_secret: // Optional, if the environment variable `AWS_SECRET` is set + aws_key: // Optional, if the environment variable `AWS_ACCESS_KEY_ID` is set + aws_secret: // Optional, if the environment variable `AWS_SECRET_ACCESS_KEY` is set concurrency: // Optional region: // Optional, see https://github.com/LearnBoost/knox#region ``` diff --git a/lib/deployer.js b/lib/deployer.js index f66ea77..a4f48c7 100644 --- a/lib/deployer.js +++ b/lib/deployer.js @@ -6,8 +6,8 @@ module.exports = function(args) { var config = { maxAsyncS3: args.concurrency, s3Options: { - accessKeyId: args.aws_key || process.env.AWS_KEY, - secretAccessKey: args.aws_secret || process.env.AWS_SECRET, + accessKeyId: args.aws_key || process.env.AWS_ACCESS_KEY_ID || process.env.AWS_KEY, + secretAccessKey: args.aws_secret || process.env.AWS_SECRET_ACCESS_KEY || process.env.AWS_SECRET, region: args.region } }; @@ -44,7 +44,7 @@ module.exports = function(args) { var uploader = client.uploadDir(params); log.info('Uploading...'); - + return uploader .on('progress', function() { // log.info(uploader.progressAmount + ' / ' + uploader.progressTotal); @@ -53,4 +53,4 @@ module.exports = function(args) { }).on('error', function(err) { log.error(err) }); -}; \ No newline at end of file +};