Skip to content

Commit

Permalink
Merge pull request #31 from GCVD-2024/develop
Browse files Browse the repository at this point in the history
[main 머지] 기능 확인용 머지
  • Loading branch information
urjimyu authored Oct 14, 2024
2 parents cad401e + adec02e commit e35f682
Show file tree
Hide file tree
Showing 94 changed files with 5,514 additions and 2 deletions.
19 changes: 19 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"plugin:prettier/recommended",
],
ignorePatterns: ["dist", ".eslintrc.js"],
parser: "@typescript-eslint/parser",
plugins: ["react-refresh"],
rules: {
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
},
};
26 changes: 26 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!-- PR 이름은 '[페이지명] 작업 내용'으로 통일할게요! -->
## 이슈 넘버
- close #
<!-- # 뒤에 이슈넘버를 써서 이슈를 닫아주세요 -->

## 구현 사항
<!-- 실제로 변경한 사항을 설명해주세요.-->

- [ ]
- [ ]
- [ ]
- [ ]

## Need Review
- ~ 부분 이렇게 구현했어요, 피드백 부탁해요!
<!-- 어떤 부분에 리뷰어가 집중해야 하는지 or 해당 PR에서 논의가 필요한 사항을 적어주세요. -->



## 📸 스크린샷
<!-- 팀원들이 이해하기 쉽도록 스크린샷을 첨부해주세요. -->



## Reference
<!-- 참고한 사이트가 있다면 링크를 공유해주세요. -->
38 changes: 38 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Deploy

on:
# main 브랜치에 푸시하면 팀 레포 fork한 개인 레포 Vercel 자동 배포되도록 설정
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
container: pandoc/latex
steps:
# workflow에 속한 레포지토리에 접근할 수 있도록 설정
- name: Checkout repository
uses: actions/checkout@v4

- name: Install mustache (to update the date)
run: apk add ruby && gem install mustache

- name: creates output
run: sh ./build.sh

- name: Pushes to another repository
id: push_directory
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.AUTO_TOKEN }}
with:
source-directory: 'output'
destination-github-username: urjimyu
destination-repository-name: gachon-vd-graduation24-fe
user-email: ${{ secrets.OFFICIAL_ACCOUNT_EMAIL }}
commit-message: ${{ github.event.commits[0].message }}
target-branch: main

- name: Test get variable exported by push-to-another-repository
run: echo $DESTINATION_CLONED_DIRECTORY
85 changes: 85 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: pr-preview
on:
# main, develop 브랜치를 향해 PR 올리면 임시 배포되도록 설정
pull_request:
types:
- opened
- reopened
- synchronize

branches: ['main', 'develop']

# 권한 설정
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
pages: write
deployments: write

# 동시성 설정
concurrency: preview-${{ github.ref }}

jobs:
deploy-preview:
runs-on: ubuntu-latest

# 버셀과 연결
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

steps:
# workflow에 속한 레포지토리에 접근할 수 있도록 설정
- name: Checkout
uses: actions/checkout@v4

- name: Install Vercel CLI
run: npm install --global vercel@latest

- name: Get Vercel Environment Variables
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}

# 종속성 설치 및 프로젝트 빌드
- name: Install and Build
run: yarn install && yarn build

- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel
id: deploy
run: |
vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} > vercel-output.txt
echo "preview_url=$(cat vercel-output.txt)" >> $GITHUB_OUTPUT
# 성능 메트릭
- name: Run Lighthouse
id: lighthouse
uses: treosh/lighthouse-ci-action@v9
with:
urls: |
${{ steps.deploy.outputs.preview_url }}
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
separator: '\n'

# PR 프리뷰 배포 링크 및 성능 점수 보여주기
- name: Comment PR with Preview URL and Lighthouse scores
uses: thollander/actions-comment-pull-request@v2
with:
message: |
🎉 구현한 기능 Preview: ${{ steps.deploy.outputs.preview_url }}
🧩 변경된 파일
${{ steps.changed-files.outputs.files }}
Lighthouse 점수:
- Performance: ${{ steps.lighthouse.outputs.performance }}
- Accessibility: ${{ steps.lighthouse.outputs.accessibility }}
- Best Practices: ${{ steps.lighthouse.outputs.best-practices }}
- SEO: ${{ steps.lighthouse.outputs.seo }}
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

.eslintcache
.vercel
.env
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"singleQuote": true,
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"printWidth": 100
}
32 changes: 30 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,30 @@
# gachon-vd-graduation24-fe
2024 가천대학교 시각디자인학과 졸업작품 웹사이트
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

- Configure the top-level `parserOptions` property like this:

```js
export default {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: __dirname,
},
}
```

- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
cd ../
mkdir output
cp -R ./gachon-vd-graduation24-fe/* ./output
cp -R ./output ./gachon-vd-graduation24-fe/
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +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>Digging Club</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
43 changes: 43 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "gachon-vd-graduation24-fe",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint:fix": "eslint src --ext ts,tsx --fix",
"format": "prettier --write \"src/**/*.{ts,tsx,css,scss}\"",
"preview": "vite preview"
},
"dependencies": {
"@gsap/react": "2.1.1",
"@tanstack/react-query": "5.51.21",
"@tanstack/react-query-devtools": "5.51.21",
"axios": "1.7.3",
"gsap": "3.12.5",
"matter-js": "0.20.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-error-boundary": "^4.0.13",
"react-router-dom": "6.26.0",
"react-youtube": "^10.1.0",
"styled-components": "6.1.12"
},
"devDependencies": {
"@types/matter-js": "0.19.7",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/styled-components": "5.1.34",
"@typescript-eslint/eslint-plugin": "^7.15.0",
"@typescript-eslint/parser": "^7.15.0",
"@vitejs/plugin-react-swc": "^3.5.0",
"eslint": "^8.57.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"react-helmet-async": "2.0.5",
"typescript": "^5.2.2",
"vite": "^5.3.4"
}
}
9 changes: 9 additions & 0 deletions public/about/ConceptExperiencing/concept-experiencing-bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions public/about/ConceptImmersing/concept-immersing-bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/about/ConceptSavoring/concept-savoring-bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions public/about/ExhibitionInfo/exhibition-info-bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/about/MainTitle/main-title-bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/about/MainTitle/main-title-top-bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions public/about/MainTitle/main_title.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e35f682

Please sign in to comment.