-
Notifications
You must be signed in to change notification settings - Fork 38
49 lines (42 loc) · 1.56 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
name: Main CI
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: git clone
uses: actions/checkout@v2
- name: .env setting
run: |
echo "REACT_APP_THREADS_APP_ID=${{ secrets.REACT_APP_THREADS_APP_ID }}" >> .env
echo "REACT_APP_THREADS_API_SECRET=${{ secrets.REACT_APP_THREADS_API_SECRET }}" >> .env
echo "REACT_APP_THREADS_REDIRECT_URL=${{ secrets.REACT_APP_THREADS_REDIRECT_URL }}" >> .env
echo "REACT_APP_THREADS_GRAPH_API_BASE_URL=${{ secrets.REACT_APP_THREADS_GRAPH_API_BASE_URL }}" >> .env
echo "REACT_APP_THREADS_SESSION_SECRET=${{ secrets.REACT_APP_THREADS_SESSION_SECRET }}" >> .env
- name: npm install
run: |
npm cache clean --force
npm install --unsafe-perm
npm install babel-cli cross-env webpack-cli --global
- name: build
run: npm run build
- name: deploy
env:
AWS_ACCESS_KEY_ID: '${{ secrets.AWS_ACCESS_KEY_ID }}'
AWS_SECRET_ACCESS_KEY: '${{ secrets.AWS_SECRET_ACCESS_KEY }}'
run: |
aws s3 cp \
--recursive \
--region ap-northeast-2 \
./build s3://ktestweb
- name: Invalidate CloudFront
uses: chetan/invalidate-cloudfront-action@v1
env:
DISTRIBUTION: ${{ secrets.DISTRIBUTION }}
PATHS: '/*'
AWS_REGION: 'ap-northeast-2'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}