Skip to content

Commit

Permalink
Deploying to ElasticBeanstalk
Browse files Browse the repository at this point in the history
  • Loading branch information
glenrobson committed Dec 11, 2024
1 parent 3f4c549 commit a166c43
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 14 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: deploy-to-eb

on:
push:
branches: [ main ]

env:
ELASTIC_BEANSTALK_NAME: iiif-website-validators
ELASTIC_BEANSTALK_ENV_NAME: iiif-image-validator-python-3
BUCKET: codepipeline-us-east-1-740788099428

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Create ZIP deployment package
run: zip -r ${{github.run_id}}.zip ./

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.SECRET_ACCESS_KEY }}
aws-region: "us-east-1"

- name: Upload package to S3 bucket
run: aws s3 cp ${{github.run_id}}.zip s3://$BUCKET/iiif-image-validator/MyApp/

- name: Create new ElasticBeanstalk Application Version
run: |
aws elasticbeanstalk create-application-version \
--application-name $ELASTIC_BEANSTALK_NAME \
--source-bundle S3Bucket=$BUCKET, S3Key="iiif-image-validator/MyApp/${{github.run_id}}.zip" \
--version-label "ver-${{ github.sha }}" \
--description "commit-sha-${{ github.sha }}"
- name: Deploy new ElasticBeanstalk Application Version
run: aws elasticbeanstalk update-environment --environment-name $ELASTIC_BEANSTALK_ENV_NAME --version-label "ver-${{ github.sha }}"
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

0 comments on commit a166c43

Please sign in to comment.