-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (33 loc) · 1.14 KB
/
cloudformation.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
name: Deploy Frontend with new AWS Services
on:
workflow_dispatch:
inputs:
project_name:
description: 'Project Name'
required: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up AWS CLI
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Deploy CloudFormation Stack
run: |
aws cloudformation deploy \
--template-file ./.github/workflows/stacks/testStackCF.yaml \
--stack-name ${{ github.event.inputs.project_name }}-stack \
--parameter-overrides ProjectName=${{ github.event.inputs.project_name }} \
--capabilities CAPABILITY_IAM
- name: Build React App
env:
VITE_API_URL: ${{ secrets.VITE_API_URL }}
run: |
npm install
npm run build
- name: Deploy frontend to S3
run: aws s3 sync ./dist/ ${{ github.event.inputs.project_name }}-group5-attendunce-bucket --delete