-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.yml
50 lines (41 loc) · 1.29 KB
/
main.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
41
42
43
44
45
46
47
48
49
50
# This is a basic workflow to help you get started with Actions
name: CICD
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Run a one-line script
uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Install Dependencies
run: yarn install
- name: Build
run: yarn build
- name: Deploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.SECRET_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS_KEY }}
run: |
aws s3 cp --recursive --region ap-northeast-2 build s3://zzzapp.co.kr
- uses: actions/checkout@main
- uses: awact/cloudfront-action@main
env:
SOURCE_PATH: './public'
AWS_REGION: 'us-east-1'
AWS_ACCESS_KEY_ID: ${{ secrets.SECRET_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS_KEY }}
DISTRIBUTION_ID: ${{ secrets.DISTRIBUTION_ID }}