Merge pull request #118 from ASFHyP3/dependabot/github_actions/ASFHyP… #116
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |