-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (35 loc) · 1.14 KB
/
deploy.yml
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
name: Deploy
on:
push:
branches:
- main
- dev
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout Docker configs
run: |
mv ./.github/workflows/deploy.sh .
chmod +x deploy.sh
- name: Configure AWS credentials from AWS account
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE }}
aws-region: us-east-1
role-session-name: GitHub-OIDC-frontend
- name: Run Deploy
env:
BRANCH: ${{ github.head_ref || github.ref_name }}
AWS_ECR: ${{ secrets.AWS_ECR }}
AWS_ECS_CLUSTER: ${{ secrets.AWS_ECS_CLUSTER }}
AWS_ECS_CLUSTER_DEV: ${{ secrets.AWS_ECS_CLUSTER_DEV }}
AWS_ECS_SERVICE: ${{ secrets.AWS_ECS_SERVICE }}
AWS_ECS_SERVICE_DEV: ${{ secrets.AWS_ECS_SERVICE_DEV }}
AWS_REGION: ${{ secrets.AWS_REGION }}
run: ./deploy.sh