-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (36 loc) · 1.07 KB
/
frontend.yaml
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
40
41
42
name: frontend-deployment
on:
push:
branches:
- main
paths:
- 'sam-formation/frontend/**'
jobs:
frontend-build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Deploy frontend to S3
uses: jakejarvis/s3-sync-action@master
with:
args: --delete
env:
AWS_S3_BUCKET: ugwulo.codes
SOURCE_DIR: sam-formation/frontend
- name: Install AWS CLI
run: |
sudo apt-get update
sudo apt-get install -y awscli
shell: bash
- name: Check AWS CLI version
run: aws --version
- name: Invalidate CloudFront cache
run: |
aws cloudfront create-invalidation --distribution-id EO4GDEKEJTLWQ --paths "/*" --debug