-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEAT] admin 배포 자동화 스크립트 작성 (#458)
- Loading branch information
Showing
7 changed files
with
102 additions
and
4 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,49 @@ | ||
name: FE Deploy for admin | ||
|
||
on: | ||
push: | ||
branches: ["main", "develop"] | ||
paths: | ||
- "frontend-admin/**" | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
working-directory: ./frontend-admin | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
|
||
- name: Generate .env File | ||
working-directory: ./frontend-admin | ||
run: | | ||
echo "VITE_API_BASE_URL=${{ secrets.API_BASE_URL_PROD }}" >> .env | ||
- name: Install Dependencies | ||
run: npm install | ||
working-directory: ./frontend-admin | ||
|
||
- name: Build | ||
run: npm run build | ||
working-directory: ./frontend-admin | ||
|
||
- name: Configure AWS CLI | ||
run: | | ||
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws configure set default.region ${{ secrets.AWS_REGION }} | ||
- name: Upload to S3 (Admin) | ||
working-directory: ./frontend-admin/dist | ||
run: | | ||
aws s3 sync . s3://${{ secrets.AWS_S3_BUCKET_ADMIN }} --delete | ||
- name: Invalidate CloudFront Cache (Admin) | ||
run: | | ||
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID_ADMIN }} --paths "/*" |
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,30 @@ | ||
name: FE Build for admin | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
paths: | ||
- "frontend-admin/**" | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
working-directory: ./frontend-admin | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
|
||
- name: Install Dependencies | ||
run: npm install | ||
working-directory: ./frontend-admin | ||
|
||
- name: Build | ||
run: npm run build | ||
working-directory: ./frontend-admin |
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,10 +1,23 @@ | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>땅콩 admin</title> | ||
<link rel="preconnect" href="https://cdn.jsdelivr.net" /> | ||
<link | ||
rel="preload" | ||
as="style" | ||
crossorigin | ||
href="https://cdn.jsdelivr.net/gh/orioncactus/[email protected]/dist/web/static/pretendard-dynamic-subset.min.css" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
as="style" | ||
crossorigin | ||
href="https://cdn.jsdelivr.net/gh/orioncactus/[email protected]/dist/web/static/pretendard-dynamic-subset.min.css" | ||
/> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
|
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
File renamed without changes.
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