update deploy to ec2 workflow #5
This file contains hidden or 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: Basic deploy | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| paths: | |
| - 'api/ic_model_api/**/*' | |
| - 'api/compose.ic-model.yml' | |
| - 'api/Dockerfile.ic-model' | |
| - 'api/requirements.ic-model.txt' | |
| - 'compose.yml' | |
| - '.github/workflows/ec2-deploy.yml' | |
| workflow_dispatch: | |
| jobs: | |
| EC2-Deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - id: deploy | |
| uses: bitovi/[email protected] | |
| with: | |
| aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws_default_region: ap-south-1 | |
| aws_elb_app_port: 8000 | |
| env_ghv: MODEL_API_ENV | |
| aws_ec2_ami_id: ami-011f45022c7d14983 # amazon/Deep Learning OSS Nvidia Driver AMI GPU PyTorch 2.7 (Amazon Linux 2023) 20250719 | |
| aws_ec2_instance_type: g5.xlarge | |
| aws_ec2_instance_root_vol_size: 30 | |
| aws_ec2_port_list: 22,80,443,8000 | |
| aws_vpc_id: vpc-0128ff2c7703a585c | |
| aws_vpc_subnet_id: subnet-0d8a90d6894e7726e | |