Skip to content

Commit ab3d68d

Browse files
authored
Merge pull request #31 from DevOps-Cloud-Team5/SCRUM-91-set-up-cf
Scrum 91 set up cf
2 parents 9ed35d5 + 92b6389 commit ab3d68d

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/cloudformation.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Deploy Frontend with CloudFormation
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
project_name:
7+
description: 'Frontend of Attendunce v0.1'
8+
required: true
9+
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up AWS CLI
16+
uses: aws-actions/configure-aws-credentials@v1
17+
with:
18+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
19+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
20+
aws-region: ${{ secrets.AWS_REGION }}
21+
- name: Deploy CloudFormation Stack
22+
run: |
23+
aws cloudformation deploy \
24+
--template-file testStackCF.yml \
25+
--stack-name ${{ github.event.inputs.project_name }}-stack \
26+
--parameter-overrides ProjectName=${{ github.event.inputs.project_name }} \
27+
--capabilities CAPABILITY_IAM
28+
- name: Deploy frontend to S3
29+
run: aws s3 sync ./dist/ ${{ secrets.S3_BUCKET }} --delete

0 commit comments

Comments
 (0)