Last active
December 20, 2018 01:25
-
-
Save potato4d/ea18f492fc4d7dd857f6b06ddda1d9bf to your computer and use it in GitHub Desktop.
Gulpを用いてサクッとS3に静的Webサイトをデプロイする ref: https://qiita.com/potato4d/items/c0248b6b216d2a32bbba
This file contains hidden or 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
var s3 = require("gulp-s3-upload")(require("./iam.json")); | |
var | |
gulp.task("deploy2s3", function(){ | |
return gulp.src([]) // デプロイ時にアップロードしたいファイル群 | |
.pipe(s3({ | |
Bucket: "バケット名", | |
ACL: "public-read" | |
})) | |
}); |
This file contains hidden or 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
{ | |
"accessKeyId" : "********", | |
"secretAccessKey": "********" | |
} |
This file contains hidden or 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
$ 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