Skip to content

Commit

Permalink
배포 테스트 (#33)
Browse files Browse the repository at this point in the history
배포 테스트
  • Loading branch information
Dobbymin authored Oct 27, 2024
2 parents a934aad + 7e2eaf2 commit 3d8a794
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 13 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/deploy-admin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Deploy Admin Page to AWS

on:
push:
branches: ["develop"]
env:
AWS_REGION: ap-northeast-2
S3_BUCKET_NAME: v-admin.gdsc-knu.com
permissions:
contents: read

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Install NodeJS
uses: actions/setup-node@v4
with:
node-version: 22

- name: Install yarn
run: |
npm install -g yarn
- name: Create .env file
run: |
echo "VITE_APP_BASE_URL=${{ secrets.VITE_APP_BASE_URL }}" >> .env
echo "VITE_ENV"=${{ secrets.VITE_ENV }} >> .env
- name: Install Dependencies
run: yarn install--frozen-lockfile

- name: Build
run: CI='' yarn run build

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}

- name: Upload to AWS S3
env:
BUCKET_NAME: ${{secrets.ADMIN_BUCKET_NAME}}
run: aws s3 sync packages/admin/dist s3://$BUCKET_NAME --delete

- name: Invalidate Cloudfront Cache
run: aws cloudfront create-invalidation --distribution-id ${{secrets.ADMIN_CLOUDFRONT_ID}} --paths /*
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules
node_modules

.DS_Store
Binary file modified packages/.DS_Store
Binary file not shown.
6 changes: 5 additions & 1 deletion packages/admin/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
vite.config.ts
jest.config.ts
jest.config.ts

dist

.github
4 changes: 4 additions & 0 deletions packages/admin/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
.vscode
.github
dist
20 changes: 10 additions & 10 deletions packages/admin/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Admin | Vision Challengethon</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Binary file added packages/admin/public/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion packages/admin/public/vite.svg

This file was deleted.

0 comments on commit 3d8a794

Please sign in to comment.