Skip to content

Commit

Permalink
[FE][Fix] secrets 위한 yml에서 .env파일 생성
Browse files Browse the repository at this point in the history
  • Loading branch information
nowaveosu committed May 24, 2023
1 parent 06766d1 commit 29c09aa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/webpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ on:
defaults:
run:
working-directory: ./client #default working directory

env:
AWS_REGION: ap-northeast-2
S3_BUCKET_NAME: dowajoyak.store
CX_VALUE: ${{ secrets.CX_VALUE }}
API_SERVER: https://server.dowajoyak.store

jobs:
Expand All @@ -31,6 +29,12 @@ jobs:
npm i
npm run build
- name: access to secrets
run: |
echo "CX_VALUE=$CX_VALUE" >> .env
env:
CX_VALUE: ${{secrets.CX_VALUE}}

# Access Key와 Secret Access Key를 통해 권한을 확인합니다.
# 아래 코드에 Access Key와 Secret Key를 직접 작성하지 않습니다.
- name: Configure AWS credentials
Expand Down
2 changes: 1 addition & 1 deletion client/src/common/GoogleSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const GoogleSearch = ({ changeInput, setAnimate, nextStep, onInput }) => {
useEffect(() => {
const gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.src = 'https://cse.google.com/cse.js?cx=' + process.env.CX_VALUE;
gcse.src = `https://cse.google.com/cse.js?cx=${process.env.CX_VALUE}`;

const s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
Expand Down
2 changes: 1 addition & 1 deletion client/src/utils/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ Axios.interceptors.response.use(
},
);
console.log(response.data);
localStorage.removeItem('accessToken');
const accessToken = response.data;
localStorage.setItem('accessToken', accessToken);

return Axios(originalRequest);
} catch (err) {
console.log(err);
Expand Down

0 comments on commit 29c09aa

Please sign in to comment.