Skip to content

Commit

Permalink
Merge pull request #2 from RockefellerArchiveCenter/development
Browse files Browse the repository at this point in the history
Adds deploy workflow
  • Loading branch information
helrond authored Nov 27, 2024
2 parents 1b98b47 + ebadf1a commit e855daa
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/enforcer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 'Check Branch'

on:
pull_request:
branches:
- base

jobs:
check_branch:
runs-on: ubuntu-latest
steps:
- name: Check branch
if: github.head_ref != 'development'
run: |
echo "ERROR: You can only merge to base from the development branch."
exit 1
34 changes: 34 additions & 0 deletions .github/workflows/push_s3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Push to S3

on:
push:
branches:
- base
- development

jobs:
push:
runs-on: ubuntu-latest
environment:
name: ${{ github.ref_name }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Configure AWS Credentials
uses: aws-actions/[email protected]
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
role-to-assume: ${{ secrets.AWS_S3_ROLE }}
aws-region: us-east-1
role-skip-session-tagging: true

- name: Sync to AWS
run: |
aws s3 sync . s3://${{ secrets.S3_BUCKET_NAME }}/digitized_image_pipeline \
--exclude '.git/*' \
--exclude '.github/*' \
--exclude 'README.md' \
--exclude 'LICENSE' \
--exclude '.DS_Store'

0 comments on commit e855daa

Please sign in to comment.