forked from genlayer-foundation/points
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (38 loc) · 1.19 KB
/
deploy-backend.yml
File metadata and controls
47 lines (38 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Deploy Backend to App Runner
on:
push:
branches: [ main ]
paths:
- 'backend/**'
workflow_dispatch: # Allow manual triggering
env:
AWS_REGION: us-east-1
SERVICE_NAME: tally-backend
jobs:
deploy:
runs-on: ubuntu-latest
environment: prod # Use the prod environment
permissions:
id-token: write # Required for OIDC
contents: read # Required to checkout code
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: ${{ env.AWS_REGION }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Deploy to App Runner
working-directory: ./backend
run: |
# Make the script executable
chmod +x deploy-apprunner.sh
# Run deployment (will auto-detect existing VPC connector)
./deploy-apprunner.sh ${{ env.SERVICE_NAME }}
- name: Deployment Summary
run: |
echo "🎉 Backend deployment initiated successfully!"
echo "Monitor progress in AWS App Runner console"