Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FE] github actions 으로 cd 를 구축한다. #1016

Merged
merged 19 commits into from
Dec 5, 2024
Merged

Conversation

ooherin
Copy link
Contributor

@ooherin ooherin commented Dec 4, 2024

❗ Issue

✨ 구현한 기능

github actions 을 통한 cd 구축

  • github actions 를 사용해 development / production 모드의 cd 를 구축하였습니다.
  • cd 과정은 기존의 pipeline 과 일치합니다. Cloudfront 의 캐시 무효화도 포함되었습니다.
  • cd 는 테스트를 완료한 상태며 문제가 없이 동작하는 것 같습니다. (prod cd 는 나중에 확인 필요)

github actiosn의 env 관리

  • 다음과 같이 settings => variable => environments 에서 모드 별로 관리하도록 하였습니다.
  • 참고로 environments 의 경우 정해진 모드 변수일 때만 해당 env 를 쓰도록 하는 것이라고 하네요!
  • Repository secrets 는 모든 mode 에서 사용가능한 공통 변수를 넣어두는 곳이라고 합니다. (이미 알고 계실수도?..ㅎㅎ)

스크린샷 2024-12-04 오후 7 53 08

불필요한 env 제거

  • 안 쓰고 있는 GA_ID 와 COOKIE 를 제거했습니다. 노션에 env 파일은 업데이트 해놓을게요~ (env파일에서 COOKIE, GA_ID 만 삭제하심 됩니다!! )

📢 논의하고 싶은 내용

🎸 기타

@ooherin ooherin self-assigned this Dec 4, 2024
@ooherin ooherin changed the title [FE] 프론트엔드 cd 코드를 수정한다. [FE] 프론트엔드 dev cd 코드를 수정한다. Dec 4, 2024
Copy link

github-actions bot commented Dec 4, 2024

Copy link

github-actions bot commented Dec 4, 2024

Copy link

github-actions bot commented Dec 4, 2024

@ooherin ooherin had a problem deploying to frontend-development December 4, 2024 03:43 — with GitHub Actions Error
@ooherin ooherin temporarily deployed to frontend-development December 4, 2024 03:43 — with GitHub Actions Inactive
echo "API_URL=${{ secrets.API_URL }}"
echo "REDIRECT_URI=${{ secrets.REDIRECT_URI }}"
echo "CLIENT_ID=${{ secrets.CLIENT_ID }}"
echo "GA_ID=${{ secrets.GA_ID }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GA 가 살아있나요 지금?

Copy link
Contributor Author

@ooherin ooherin Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

필요없는 것 같아서 해당 코드를 다 지웠습니다! env 에서 제외시켜도 될 것 같아요

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네넹~ 굳

@@ -27,7 +27,7 @@ const S = {
display: flex;
justify-content: center;
align-items: center;
height: 100vh; /* 전체 화면 높이에 맞춰 정렬 */
height: 100vh;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link

github-actions bot commented Dec 4, 2024

@ooherin ooherin temporarily deployed to frontend-development December 4, 2024 10:47 — with GitHub Actions Inactive
@ooherin ooherin changed the title [FE] 프론트엔드 dev cd 코드를 수정한다. [FE] github actions 으로 cd 를 구축한다. Dec 4, 2024
Copy link

github-actions bot commented Dec 4, 2024

Copy link

github-actions bot commented Dec 4, 2024

@ooherin ooherin requested a review from skiende74 December 4, 2024 11:00
@skiende74
Copy link
Contributor

수고하셨습니다

Copy link
Contributor

@skiende74 skiende74 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다. 리뷰남겼습니다

Comment on lines 39 to 46
- name: Install Dependencies
working-directory: ./frontend
run: npm install

- name: Build for Dev
working-directory: ./frontend
run: npm run build:dev-fe

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

프로젝트나 기존 yml 파일들도 모두 yarn인 만큼 npm말고 yarn으로 통일하는 게 좋을거같습니다!
CI 시간단축에도 도움이 되고요

yarn을 쓰려면 node버전이 16.10이상이어야해서 node-version: 18.x을 해두시면 될 거 같네요.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

와 이부분은 빠트렸네요!! 역시 제이드입니다 👍👍

@ooherin ooherin merged commit f7f4edf into dev-fe Dec 5, 2024
3 checks passed
@ooherin ooherin deleted the feat/1013-cd branch December 5, 2024 00:34
Copy link

github-actions bot commented Dec 5, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants