Testing on deploy branch #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy-to-eb | |
on: | |
push: | |
branches: [ deploy ] | |
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 }}" |