Skip to content

Instantly share code, notes, and snippets.

@Olgagr
Created October 28, 2014 11:38
Show Gist options
  • Save Olgagr/70ce8fa52c71275e4942 to your computer and use it in GitHub Desktop.
Save Olgagr/70ce8fa52c71275e4942 to your computer and use it in GitHub Desktop.
Gupl aws deployment script
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