Created
October 28, 2014 11:38
-
-
Save Olgagr/70ce8fa52c71275e4942 to your computer and use it in GitHub Desktop.
Gupl aws deployment script
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
function deploy(env) { | |
var bucketSuffix = env === 'staging' ? '-staging' : ''; | |
var publisher = $.awspublish.create({ | |
key: 'xxxx', | |
secret: 'xxx', | |
bucket: 'picaly.co' + bucketSuffix, | |
region: 'eu-west-1' | |
}); | |
return gulp.src('./dist/**/*') | |
.pipe(publisher.publish()) | |
.pipe(publisher.sync()) | |
.pipe(publisher.cache()) | |
.pipe($.awspublish.reporter()); | |
} | |
gulp.task('deploy:staging', function() { | |
return deploy('staging'); | |
}); | |
gulp.task('deploy:production', function() { | |
return deploy('production'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment