Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Commit

Permalink
Fixes for s3-sync action
Browse files Browse the repository at this point in the history
Split s3-sync.yaml out into dev and stable actions. Dev will run on any branch pull that is not stable.

Added DEST_DIR so the sync uploads to 'deployment/latest' for stable and 'deployment/dev' for dev. Otherwise it would upload to the root directory of the bucket.

Should address #24
  • Loading branch information
csears-hg committed Nov 5, 2021
1 parent a494617 commit 6e01a53
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/s3-sync-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Upload Cloud Formation - Dev

on:
push:
branches:
- '**'
- '!stable'

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-2' # optional: defaults to us-east-1
SOURCE_DIR: 'cfn' # optional: defaults to entire repository
DEST_DIR: 'deployment/dev'
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Upload Cloud Formation
name: Upload Cloud Formation - Stable

on:
push:
branches:
- dev
- stable

jobs:
deploy:
Expand All @@ -18,4 +18,5 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-2' # optional: defaults to us-east-1
SOURCE_DIR: 'cfn/hd-notebooks-cfn.yaml' # optional: defaults to entire repository
SOURCE_DIR: 'cfn' # optional: defaults to entire repository
DEST_DIR: 'deployment/latest'

0 comments on commit 6e01a53

Please sign in to comment.