Skip to content

Instantly share code, notes, and snippets.

@potato4d
Last active December 20, 2018 01:25
Show Gist options
  • Save potato4d/ea18f492fc4d7dd857f6b06ddda1d9bf to your computer and use it in GitHub Desktop.
Save potato4d/ea18f492fc4d7dd857f6b06ddda1d9bf to your computer and use it in GitHub Desktop.
Gulpを用いてサクッとS3に静的Webサイトをデプロイする ref: https://qiita.com/potato4d/items/c0248b6b216d2a32bbba
var s3 = require("gulp-s3-upload")(require("./iam.json"));
var
gulp.task("deploy2s3", function(){
return gulp.src([]) // デプロイ時にアップロードしたいファイル群
.pipe(s3({
Bucket: "バケット名",
ACL: "public-read"
}))
});
{
"accessKeyId" : "********",
"secretAccessKey": "********"
}
$ gulp deploy2s3
[04:49:52] Uploading ..... index.html
[04:49:52] No Change ..... images/favicon.png
[04:49:52] No Change ..... js/bundle.js
[04:49:52] No Change ..... css/style.css
[04:49:52] Updated ....... index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment