-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (35 loc) · 1.01 KB
/
build.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
40
name: 📦 Build
run-name: 📦 Build triggered
on: push
jobs:
build:
name: cesarolvr.com build
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@master
- name: install node.js
uses: actions/setup-node@v1
with:
node-version: "18.x"
- name: install app dependencies
run: yarn
- name: building app
run: yarn build
- name: uploading to S3
run: |
aws s3 sync ./public s3://cesarolvr
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ID }}
AWS_DEFAULT_REGION: us-east-1
- name: Invalidate cloudfront
uses: chetan/invalidate-cloudfront-action@v2
env:
DISTRIBUTION: EK8MEW24SE878
PATHS: "/*"
AWS_REGION: "us-east-1"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ID }}