Skip to content

Commit f364909

Browse files
authored
Update deploy-production.yml
1 parent e85ff30 commit f364909

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
name: Deploy Production
1+
name: Deploy to Elastic Beanstalk
22

33
on:
44
push:
5-
tags: ['v*.*.*'] # Trigger on semantic version tags
5+
tags: ['v*.*.*'] # Trigger deployment on semantic version tags (e.g., v1.0.0)
66

77
jobs:
8-
promote:
8+
deploy:
99
runs-on: ubuntu-latest
10-
environment: production
1110

1211
steps:
13-
- name: Checkout repo
12+
- name: Checkout code
1413
uses: actions/checkout@v4
1514

1615
- name: Set up Node.js
1716
uses: actions/setup-node@v4
1817
with:
19-
node-version: 20
18+
node-version: '20'
2019

2120
- name: Install dependencies
2221
run: npm ci
@@ -29,13 +28,14 @@ jobs:
2928
tags: ghcr.io/${{ github.repository }}:prod
3029

3130
# Alternative: Use ECS deploy if beanstalk deploy is missing
32-
- name: Deploy to Elastic Beanstalk (alternative)
31+
- name: Deploy to AWS Elastic Beanstalk (or ECS)
3332
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
3433
with:
35-
task-definition: backend/taskdef.json # Define your task definition here
36-
service: ai-eyes-prod
3734
cluster: ai-eyes
35+
service: ai-eyes-prod
36+
task-definition: backend/taskdef.json # Ensure your task definition is correct
3837
wait-for-service-stability: true
39-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
40-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
4138
aws-region: us-east-1
39+
env:
40+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
41+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

0 commit comments

Comments
 (0)