-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (31 loc) · 982 Bytes
/
deploy-dev.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
name: CD for flyover-api dev
on:
push:
branches:
- QA-Test
permissions:
contents: read
jobs:
execute-command:
runs-on: ubuntu-latest
environment: dev
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
role-to-assume: ${{ secrets.DEV_ROLE_ARN }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Execute deployment command on EC2 instance
run: |
aws ssm send-command \
--document-name "deployBEDevDocument" \
--instance-ids "$INSTANCE_ID" \
--document-version '$LATEST'
echo "Deploy sent to EC2 instance"
env:
INSTANCE_ID: ${{ secrets.DEV_INSTANCE_ID }}