-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (31 loc) · 995 Bytes
/
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
name: Deploy to AWS
on:
push:
branches:
- main
env:
STACK_NAME: hyp3-nasa-disasters
AWS_REGION: us-west-2
TEMPLATE_FILE: cloudformation.yml
AWS_ACCESS_KEY_ID: ${{ secrets.V2_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.V2_AWS_SECRET_ACCESS_KEY }}
CLOUDFORMATION_ROLE_ARN: ${{ secrets.CLOUDFORMATION_ROLE_ARN }}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.TOOLS_BOT_PAK }}
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}
- name: Deploy
run: |
aws cloudformation deploy \
--stack-name ${STACK_NAME} \
--template-file ${TEMPLATE_FILE} \
--role-arn ${CLOUDFORMATION_ROLE_ARN} \
--capabilities CAPABILITY_IAM