Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
Another attempt to pull from env
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonb927 committed Mar 9, 2024
1 parent 0abedf1 commit c38e182
Showing 1 changed file with 15 additions and 21 deletions.
36 changes: 15 additions & 21 deletions brandonb.ca/gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,11 @@ 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 @@ -284,20 +286,13 @@ 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,
credentials: process.env.CI ? fromEnv() : fromIni({ profile: 'personal' }),
},
{
'Cache-Control': 'max-age=315360000, no-transform, public',
Expand All @@ -317,11 +312,7 @@ 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 @@ -377,18 +368,21 @@ 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 c38e182

Please sign in to comment.