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

Commit

Permalink
Fix awspublish to use env vars as fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonb927 committed Mar 9, 2024
1 parent 1b424ac commit ff091f7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,21 @@ jobs:

- uses: actions/cache@v4
with:
path: vendor/bundle
key: ${{ runner.os }}-brandonb.ca-${{ hashFiles('**/Gemfile.lock') }}
path: .awspublish-brandonb-web-media
key: ${{ runner.os }}-awspublish-cache-${{ hashFiles('**/.awspublish-brandonb-web-media') }}
restore-keys: |
${{ runner.os }}-brandonb.ca-
${{ runner.os }}-awspublish-cache-
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3'
bundler-cache: true

- uses: actions/setup-node@v4
with:
node-version: 20
cache-dependency-path: 'package-lock.json'
cache: 'npm'

- name: Install ruby dependencies
run: gem install bundler && bundle install
Expand Down
3 changes: 2 additions & 1 deletion brandonb.ca/gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { spawn } from 'child_process'
import path from 'path'

import { fromIni } from '@aws-sdk/credential-provider-ini'
import { fromEnv } from '@aws-sdk/credential-provider-env'
import browsersync from 'browser-sync'
import { deleteAsync } from 'del'
import gulp from 'gulp'
Expand Down Expand Up @@ -291,7 +292,7 @@ function s3_media() {
params: {
Bucket: configProd.deploy.s3.bucketMedia,
},
credentials: fromIni({ profile: 'personal' }),
credentials: fromIni({ profile: 'personal' }) || fromEnv(),
},
{
'Cache-Control': 'max-age=315360000, no-transform, public',
Expand Down

0 comments on commit ff091f7

Please sign in to comment.