Skip to content
name: Deploy to AWS Elastic Beanstalk Dev
on:
push:
branches:
- dev
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install AWS CLI
run: pip install awsebcli
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Copy Elastic Beanstalk Config
run: |
mkdir -p .elasticbeanstalk
echo "${{ secrets.EB_CONFIG }}" > .elasticbeanstalk/config.yml
- name: Deploy to Elastic Beanstalk
run: |
eb deploy ${{ secrets.ENVIRONMENT_NAME }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}