Skip to content

Commit

Permalink
Fix credentials reference
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonb927 committed Mar 9, 2024
1 parent ff091f7 commit 0abedf1
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions brandonb.ca/gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,9 @@ export const build_prod = gulp.series(
)

export function generate_share_images() {
return spawn(
'node',
['gulp_tasks/generate-share-images.js'],
{ stdio: 'inherit' }
)
return spawn('node', ['gulp_tasks/generate-share-images.js'], {
stdio: 'inherit',
})
}

/**
Expand All @@ -286,13 +284,20 @@ function surge_deploy() {
}

function s3_media() {
let credentials
try {
credentials = fromIni({ profile: 'personal' })
} catch (error) {
credentials = fromEnv()
}

let publisher = awspublish.create(
{
region: configProd.deploy.s3.region,
params: {
Bucket: configProd.deploy.s3.bucketMedia,
},
credentials: fromIni({ profile: 'personal' }) || fromEnv(),
credentials,
},
{
'Cache-Control': 'max-age=315360000, no-transform, public',
Expand All @@ -312,7 +317,11 @@ function s3_media() {
.pipe(awspublish.reporter())
}

export const deploy_dryrun = gulp.series(build_prod, generate_share_images, optimize_prod)
export const deploy_dryrun = gulp.series(
build_prod,
generate_share_images,
optimize_prod
)

export const deploy = gulp.series(
build_prod,
Expand Down Expand Up @@ -368,21 +377,18 @@ function jekyll_build_prod(cb) {
export function watch() {
gulp.watch(
configDev.watch.jekyll,
gulp.series(
jekyll_build_dev,
function browsersync_reload(cb) {
bsServer.reload()
/*
gulp.series(jekyll_build_dev, function browsersync_reload(cb) {
bsServer.reload()
/*
console.log(`** Reminder **`)
console.log(`BrowserSync URLs`)
console.log(`├── ${browsersyncLocalURL}`)
console.log(`└── ${browsersyncExternalURL}`)
console.log(`ngrok URL`)
console.log(`└── ${ngrokURL}`)
*/
cb()
}
)
cb()
})
)
gulp.watch(configDev.watch.styles, styles_dev)
gulp.watch(configDev.watch.scripts, scripts_dev)
Expand Down

0 comments on commit 0abedf1

Please sign in to comment.