-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (67 loc) · 3.72 KB
/
main.yml
File metadata and controls
77 lines (67 loc) · 3.72 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# This is a basic workflow to help you get started with Actions
name: CI/CD
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the dev branch
push:
branches: [master]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: "us-west-2"
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout source code.
uses: actions/checkout@v3
- 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: Generate Environment Variables File for Production
run: |
echo "REACT_APP_AXIOS_INSTANCE_BASEURL=$REACT_APP_AXIOS_INSTANCE_BASEURL" >> .env.production
echo "REACT_APP_FIREBASE_APIKEY=$REACT_APP_FIREBASE_APIKEY" >> .env.production
echo "REACT_APP_FIREBASE_APPID=$REACT_APP_FIREBASE_APPID" >> .env.production
echo "REACT_APP_FIREBASE_AUTHDOMAIN=$REACT_APP_FIREBASE_AUTHDOMAIN" >> .env.production
echo "REACT_APP_FIREBASE_DATABASEURL=$REACT_APP_FIREBASE_DATABASEURL" >> .env.production
echo "REACT_APP_FIREBASE_MESSAGINGSENDERID=$REACT_APP_FIREBASE_MESSAGINGSENDERID" >> .env.production
echo "REACT_APP_FIREBASE_PROJECTID=$REACT_APP_FIREBASE_PROJECTID" >> .env.production
echo "REACT_APP_FIREBASE_STORAGEBUCKET=$REACT_APP_FIREBASE_STORAGEBUCKET" >> .env.production
echo "REACT_APP_GOOGLE_CALLBACK=$REACT_APP_GOOGLE_CALLBACK" >> .env.production
echo "REACT_APP_GOOGLE_CLIENTID=$REACT_APP_GOOGLE_CLIENTID" >> .env.production
echo "REACT_APP_KAKAO_APPKEY=$REACT_APP_KAKAO_APPKEY" >> .env.production
echo "REACT_APP_KAKAO_REDIRECT_URI=$REACT_APP_KAKAO_REDIRECT_URI" >> .env.production
echo "REACT_APP_KAKAO_REST_API_KEY=$REACT_APP_KAKAO_REST_API_KEY" >> .env.production
echo "REACT_APP_SENTRY_REACT_DSN=$REACT_APP_SENTRY_REACT_DSN" >> .env.production
env:
REACT_APP_AXIOS_INSTANCE_BASEURL: ${{ secrets.REACT_APP_AXIOS_INSTANCE_BASEURL }}
REACT_APP_FIREBASE_APIKEY: ${{ secrets.REACT_APP_FIREBASE_APIKEY }}
REACT_APP_FIREBASE_APPID: ${{ secrets.REACT_APP_FIREBASE_APPID }}
REACT_APP_FIREBASE_AUTHDOMAIN: ${{ secrets.REACT_APP_FIREBASE_AUTHDOMAIN }}
REACT_APP_FIREBASE_DATABASEURL: ${{ secrets.REACT_APP_FIREBASE_DATABASEURL }}
REACT_APP_FIREBASE_MESSAGINGSENDERID: ${{ secrets.REACT_APP_FIREBASE_MESSAGINGSENDERID }}
REACT_APP_FIREBASE_PROJECTID: ${{ secrets.REACT_APP_FIREBASE_PROJECTID }}
REACT_APP_FIREBASE_STORAGEBUCKET: ${{ secrets.REACT_APP_FIREBASE_STORAGEBUCKET }}
REACT_APP_GOOGLE_CALLBACK: ${{ secrets.REACT_APP_GOOGLE_CALLBACK }}
REACT_APP_GOOGLE_CLIENTID: ${{ secrets.REACT_APP_GOOGLE_CLIENTID }}
REACT_APP_KAKAO_APPKEY: ${{ secrets.REACT_APP_KAKAO_APPKEY }}
REACT_APP_KAKAO_REDIRECT_URI: ${{ secrets.REACT_APP_KAKAO_REDIRECT_URI }}
REACT_APP_KAKAO_REST_API_KEY: ${{ secrets.REACT_APP_KAKAO_REST_API_KEY }}
REACT_APP_SENTRY_REACT_DSN: ${{ secrets.REACT_APP_SENTRY_REACT_DSN }}
- name: yarn install
run: yarn install
- name: Build
run: yarn build
env:
CI: "" # 경고를 에러로 보지 않게 함
- name: Deploy S3 # Upload build file to S3
run: |
aws s3 cp --recursive --region us-west-2 build s3://neonaduri.com