Skip to content

kjlippold is deploying HydroServer Dev to AWS Elastic Beanstalk on refs/heads/main #415

kjlippold is deploying HydroServer Dev to AWS Elastic Beanstalk on refs/heads/main

kjlippold is deploying HydroServer Dev to AWS Elastic Beanstalk on refs/heads/main #415

Workflow file for this run

name: HydroServer Dev AWS Elastic Beanstalk Deployment
run-name: ${{ github.actor }} is deploying HydroServer Dev to AWS Elastic Beanstalk on ${{ github.ref }}
on:
workflow_run:
workflows: ["HydroServer Tests"]
branches:
- dev
types:
- completed
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
ref: dev
- name: Create deployment package
run: zip -r deploy_package.zip ./
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }}
aws-region: 'us-east-1'
- name: Upload deployment package to S3
run: aws s3 cp deploy_package.zip s3://hydroserver/deployment/dev/deploy_package_${{ github.event.workflow_run.head_sha }}.zip
- name: Create ElasticBeanstalk Application Version
run: |
aws elasticbeanstalk create-application-version \
--application-name hydroserver-dev \
--source-bundle S3Bucket="hydroserver",S3Key="deployment/dev/deploy_package_${{ github.event.workflow_run.head_sha }}.zip" \
--version-label "${{ github.event.workflow_run.head_sha }}" \
--description "commit-sha-${{ github.event.workflow_run.head_sha }}"
- name: Deploy ElasticBeanstalk Application Version
run: |
aws elasticbeanstalk update-environment \
--environment-name hydroserver-dev-env \
--version-label "${{ github.event.workflow_run.head_sha }}"