File tree Expand file tree Collapse file tree 1 file changed +16
-26
lines changed Expand file tree Collapse file tree 1 file changed +16
-26
lines changed Original file line number Diff line number Diff line change 1
- name : Deploy to Elastic Beanstalk
1
+ name : Deploy React Client (Production)
2
2
3
3
on :
4
4
push :
5
- tags : ['v*.*.*'] # Trigger deployment on semantic version tags (e.g., v1.0.0)
5
+ tags :
6
+ - ' v*.*.*'
6
7
7
8
jobs :
8
- deploy :
9
+ build-and- deploy :
9
10
runs-on : ubuntu-latest
10
-
11
11
steps :
12
- - name : Checkout code
13
- uses : actions/checkout@v4
12
+ - uses : actions/checkout@v4
14
13
15
- - name : Set up Node.js
16
- uses : actions/setup-node@v4
14
+ - uses : actions/setup-node@v4
17
15
with :
18
- node-version : ' 20 '
16
+ node-version : ' 18 '
19
17
20
18
- name : Install dependencies
19
+ working-directory : client
21
20
run : npm ci
22
21
23
- - name : Build Docker image
24
- uses : docker/build-push-action@v5
25
- with :
26
- context : ./backend
27
- push : true
28
- tags : ghcr.io/${{ github.repository }}:prod
22
+ - name : Build client
23
+ working-directory : client
24
+ run : npm run build
29
25
30
- # Alternative: Use ECS deploy if beanstalk deploy is missing
31
- - name : Deploy to AWS Elastic Beanstalk (or ECS)
32
- uses : aws-actions/amazon-ecs-deploy-task-definition@v1
26
+ - name : Deploy to GitHub Pages
27
+ uses : JamesIves/github-pages-deploy-action@v4
33
28
with :
34
- cluster : ai-eyes
35
- service : ai-eyes-prod
36
- task-definition : backend/taskdef.json # Ensure your task definition is correct
37
- wait-for-service-stability : true
38
- 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 }}
29
+ branch : gh-pages
30
+ folder : client/build
31
+ token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments