gulp upload_images

This commit is contained in:
Matt Walsh 2022-12-09 11:58:47 -06:00
parent f7505e3e6f
commit 1cf9f41ca0
4 changed files with 16 additions and 4 deletions

2
dist/index.html vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -142,6 +142,18 @@ gulp.task('upload', () => gulp.src(uploadSources, { base: './dist' })
}, },
}))); })));
const imageSources = [
'server/fonts/**',
'server/images/**',
];
gulp.task('upload_images', () => gulp.src(imageSources, { base: './server' })
.pipe(
s3({
Bucket: 'weatherstar',
StorageClass: 'STANDARD',
}),
));
gulp.task('invalidate', async () => cloudfront.createInvalidation({ gulp.task('invalidate', async () => cloudfront.createInvalidation({
DistributionId: 'E9171A4KV8KCW', DistributionId: 'E9171A4KV8KCW',
InvalidationBatch: { InvalidationBatch: {
@ -153,4 +165,4 @@ gulp.task('invalidate', async () => cloudfront.createInvalidation({
}, },
}).promise()); }).promise());
module.exports = gulp.series(clean, gulp.parallel('build_js', 'compress_js_data', 'compress_js_vendor', 'copy_css', 'compress_html', 'copy_other_files'), 'upload', 'invalidate'); module.exports = gulp.series(clean, gulp.parallel('build_js', 'compress_js_data', 'compress_js_vendor', 'copy_css', 'compress_html', 'copy_other_files'), gulp.parallel('upload', 'upload_images'), 'invalidate');