-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #111 from wafflestudio/feat/dotenv
배포 페이즈 별 환경 설정 및 github action 개선 및 PR 템플릿 간소화
- Loading branch information
Showing
8 changed files
with
55 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
VITE_BASE_URL=https://wacruit-dev.wafflestudio.com/api/v1 | ||
VITE_SSO_LOGIN_URL=https://sso-dev.wafflestudio.com | ||
VITE_SSO_REDIRECT_URL=https://wacruit-dev.wafflestudio.com/sso |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
VITE_BASE_URL=https://wacruit.wafflestudio.com/api/v1 | ||
VITE_SSO_LOGIN_URL=https://sso.wafflestudio.com | ||
VITE_SSO_REDIRECT_URL=https://wacruit.wafflestudio.com/sso |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,12 @@ | ||
### 요약 | ||
- 마감 기한: YY-MM-DD | ||
- 상태: <!-- 상태: 시작 안 함 / 진행 중 / 리뷰 필요 / 머지 필요 --> | ||
## 요약 | ||
<!-- 1줄 요약 --> | ||
|
||
### 태스크 URL | ||
## 변경 내역 | ||
<!-- 가능한 상세히 작성 --> | ||
|
||
### 체크리스트 | ||
__PR 전__ | ||
- [ ] 칸반 생성 | ||
- [ ] pre-commit 성공 | ||
- [ ] type-label 추가 | ||
## 체크리스트 | ||
- [ ] pre-commit 통과 | ||
- [ ] PR Assignees 추가 | ||
- [ ] PR Labels 추가 | ||
|
||
__머지 전__ | ||
- [ ] 칸반 옮기기 | ||
- [ ] 코멘트 리졸브 | ||
- [ ] squash & merge | ||
|
||
### 작업 목록 | ||
|
||
### 테스트 방법 (Optional) | ||
|
||
### 기타 질문 및 공유 사항 (Optional) | ||
## 기타 질문 및 공유 사항 (Optional) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,15 @@ name: Dev CICD | |
on: | ||
push: | ||
branches: main | ||
|
||
concurrency: | ||
group: deploy-dev | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
Build: | ||
Deploy: | ||
runs-on: ubuntu-latest | ||
environment: dev | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
@@ -16,22 +22,22 @@ jobs: | |
- name: Install dependencies | ||
run: yarn | ||
- name: Build | ||
run: yarn build | ||
run: yarn build --mode development | ||
- name: Upload to S3 | ||
uses: jakejarvis/s3-sync-action@master | ||
with: | ||
args: --delete | ||
env: | ||
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET_DEV }} | ||
AWS_S3_BUCKET: ${{ vars.AWS_S3_BUCKET }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: ${{secrets.AWS_REGION}} | ||
AWS_REGION: ${{vars.AWS_REGION}} | ||
SOURCE_DIR: "dist" | ||
- name: Invalidate Cloudfront cache | ||
uses: chetan/invalidate-cloudfront-action@v2 | ||
env: | ||
DISTRIBUTION: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_DEV }} | ||
DISTRIBUTION: ${{ vars.AWS_CLOUDFRONT_DISTRIBUTION }} | ||
PATHS: "/*" | ||
AWS_REGION: ${{secrets.AWS_REGION}} | ||
AWS_REGION: ${{vars.AWS_REGION}} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
# Release 배포용 CI/CD workflow. | ||
|
||
name: Release CICD | ||
name: Prod CICD | ||
on: | ||
push: | ||
branches: release | ||
|
||
concurrency: | ||
group: deploy-prod | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
Build: | ||
Deploy: | ||
runs-on: ubuntu-latest | ||
environment: prod | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
@@ -18,22 +22,22 @@ jobs: | |
- name: Install dependencies | ||
run: yarn | ||
- name: Build | ||
run: yarn build | ||
run: yarn build --mode production | ||
- name: Upload to S3 | ||
uses: jakejarvis/s3-sync-action@master | ||
with: | ||
args: --delete | ||
env: | ||
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET_RELEASE }} | ||
AWS_S3_BUCKET: ${{ vars.AWS_S3_BUCKET }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: ${{secrets.AWS_REGION}} | ||
AWS_REGION: ${{vars.AWS_REGION}} | ||
SOURCE_DIR: "dist" | ||
- name: Invalidate Cloudfront cache | ||
uses: chetan/invalidate-cloudfront-action@v2 | ||
env: | ||
DISTRIBUTION: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_RELEASE }} | ||
DISTRIBUTION: ${{ vars.AWS_CLOUDFRONT_DISTRIBUTION }} | ||
PATHS: "/*" | ||
AWS_REGION: ${{secrets.AWS_REGION}} | ||
AWS_REGION: ${{vars.AWS_REGION}} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,9 @@ | ||
export const baseURL = | ||
import.meta.env.VITE_API_TYPE === "MSW" | ||
? "" | ||
: "https://wacruit-dev.wafflestudio.com/api/v1"; | ||
export const BASE_URL = | ||
import.meta.env.VITE_API_TYPE === "MSW" ? "" : import.meta.env.VITE_BASE_URL; | ||
|
||
export const ssoLoginURL = | ||
export const SSO_LOGIN_URL = | ||
import.meta.env.VITE_API_TYPE === "MSW" | ||
? "" | ||
: "https://sso-dev.wafflestudio.com/?redirect_uri="; | ||
|
||
export const ssoRedirectURI = (recruitId: number | "home") => | ||
`https://wacruit-dev.wafflestudio.com/sso/${recruitId}`; | ||
|
||
// export const baseURL = "https://wacruit.wafflestudio.com/api/v1"; | ||
|
||
// export const ssoLoginURL = "https://sso.wafflestudio.com/?redirect_uri="; | ||
: import.meta.env.VITE_SSO_LOGIN_URL; | ||
|
||
// export const ssoRedirectURI = (recruitId: number | "home") => | ||
// `https://wacruit.wafflestudio.com/sso/${recruitId}`; | ||
export const SSO_REDIRECT_URL = import.meta.env.VITE_SSO_REDIRECT_URL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters