Skip to content

Commit

Permalink
Adds environment creds to ve7tzb.ca site
Browse files Browse the repository at this point in the history
Runs jobs specific to folder changes
  • Loading branch information
brandonb927 committed Mar 9, 2024
1 parent abfa6d4 commit ff6079d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,28 @@ on:
- 'master'

jobs:
files_changed:
name: Get changed files
runs-on: ubuntu-latest
outputs:
brandonb_ca: ${{ steps.filter.outputs.brandonb_ca }}
ve7tzb_ca: ${{ steps.filter.outputs.ve7tzb_ca }}
steps:
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
brandonb_ca:
- 'brandonb.ca/**'
ve7tzb_ca:
- 've7tzb.ca/**'
build-brandonb_ca:
name: Build and Deploy brandonb.ca
runs-on: ubuntu-latest
needs:
- files_changed
if: ${{ needs.files_changed.outputs.brandonb_ca == 'true' }}
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -63,8 +82,13 @@ jobs:
build-ve7tzb_ca:
name: Build and Deploy ve7tzb.ca
runs-on: ubuntu-latest
needs:
- files_changed
if: ${{ needs.files_changed.outputs.ve7tzb_ca == 'true' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/cache@v4
with:
Expand Down
3 changes: 2 additions & 1 deletion ve7tzb.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 @@ -276,7 +277,7 @@ function s3_media() {
params: {
Bucket: configProd.deploy.s3.bucketMedia,
},
credentials: fromIni({ profile: 'personal' }),
credentials: process.env.CI ? fromEnv() : fromIni({ profile: 'personal' }),
},
{
'Cache-Control': 'max-age=315360000, no-transform, public',
Expand Down

0 comments on commit ff6079d

Please sign in to comment.