-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
183 changed files
with
24,353 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 @@ | ||
@doputer @dahyeon405 @MinHK4 @parkhyeonki |
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,19 @@ | ||
## 개요 | ||
|
||
|
||
|
||
## 변경 사항 | ||
|
||
- | ||
|
||
## 참고 사항 | ||
|
||
- | ||
|
||
## 스크린샷 | ||
|
||
|
||
|
||
## 관련 이슈 | ||
|
||
- |
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,38 @@ | ||
name: Backend CD | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
paths: | ||
- 'backend/**' | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Generate Environment Variables | ||
run: | | ||
echo "$BACKEND_ENV" >> .env.production | ||
env: | ||
CI: false | ||
BACKEND_ENV: '${{ secrets.BACKEND_ENV }}' | ||
|
||
- name: Transfer Environment Variables with SCP | ||
uses: appleboy/scp-action@master | ||
with: | ||
host: ${{ secrets.SSH_HOST }} | ||
username: ${{ secrets.SSH_USERNAME }} | ||
password: ${{ secrets.SSH_PASSWORD }} | ||
port: ${{ secrets.SSH_PORT }} | ||
source: '.env.production' | ||
target: 'knoticle/backend/env' | ||
|
||
- name: Deploy | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.SSH_HOST }} | ||
username: ${{ secrets.SSH_USERNAME }} | ||
password: ${{ secrets.SSH_PASSWORD }} | ||
port: ${{ secrets.SSH_PORT }} | ||
script: ${{ secrets.SSH_BACKEND_SCRIPT }} |
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,38 @@ | ||
name: Frontend CD | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
paths: | ||
- 'frontend/**' | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Generate Environment Variables | ||
run: | | ||
echo "$FRONTEND_ENV" >> .env.production | ||
env: | ||
CI: false | ||
FRONTEND_ENV: '${{ secrets.FRONTEND_ENV }}' | ||
|
||
- name: Transfer Environment Variables with SCP | ||
uses: appleboy/scp-action@master | ||
with: | ||
host: ${{ secrets.SSH_HOST }} | ||
username: ${{ secrets.SSH_USERNAME }} | ||
password: ${{ secrets.SSH_PASSWORD }} | ||
port: ${{ secrets.SSH_PORT }} | ||
source: '.env.production' | ||
target: 'knoticle/frontend' | ||
|
||
- name: Deploy | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.SSH_HOST }} | ||
username: ${{ secrets.SSH_USERNAME }} | ||
password: ${{ secrets.SSH_PASSWORD }} | ||
port: ${{ secrets.SSH_PORT }} | ||
script: ${{ secrets.SSH_FRONTEND_SCRIPT }} |
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,123 @@ | ||
name: Frontend CI | ||
|
||
on: | ||
pull_request: | ||
branches: [main, develop] | ||
paths: | ||
- 'frontend/**' | ||
|
||
jobs: | ||
lint: | ||
name: Lint CI | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache Dependencies | ||
uses: actions/cache@v3 | ||
id: frontend-cache | ||
with: | ||
path: frontend/node_modules | ||
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-build- | ||
${{ runner.OS }}- | ||
- if: ${{ steps.frontend-cache.outputs.cache-hit != 'true' }} | ||
name: Install Dependencies | ||
run: npm install | ||
working-directory: frontend | ||
|
||
- name: Check Lint | ||
run: npm run lint | ||
env: | ||
CI: true | ||
working-directory: frontend | ||
|
||
lighthouse: | ||
name: Lighthouse CI | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache Dependencies | ||
uses: actions/cache@v3 | ||
id: frontend-cache | ||
with: | ||
path: frontend/node_modules | ||
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-build- | ||
${{ runner.OS }}- | ||
- if: ${{ steps.frontend-cache.outputs.cache-hit != 'true' }} | ||
name: Install Dependencies | ||
run: npm install | ||
working-directory: frontend | ||
|
||
- name: Build | ||
run: npm run build | ||
working-directory: frontend | ||
|
||
- name: Run Lighthouse CI | ||
env: | ||
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} | ||
run: | | ||
npm install -g @lhci/cli | ||
lhci autorun | ||
working-directory: frontend | ||
|
||
- name: Format Lighthouse Score | ||
id: format_lighthouse_score | ||
uses: actions/github-script@v3 | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
script: | | ||
const fs = require('fs'); | ||
const results = JSON.parse(fs.readFileSync('frontend/lighthouse_reports/manifest.json')); | ||
const summaryTotal = {}; | ||
results.forEach((result) => { | ||
const { summary } = result; | ||
const formatResult = (res) => Math.round(res * 100); | ||
Object.keys(summary).forEach((key) => { | ||
if (key in summaryTotal) summaryTotal[key] += formatResult(summary[key]); | ||
else summaryTotal[key] = formatResult(summary[key]); | ||
}); | ||
}); | ||
Object.keys(summaryTotal).forEach((key) => { | ||
summaryTotal[key] = Math.round(summaryTotal[key] / results.length); | ||
}); | ||
const score = (res) => (res >= 90 ? '🟢' : res >= 50 ? '🟠' : '🔴'); | ||
const comment = [ | ||
`⚡️ Lighthouse report!`, | ||
`| Category | Score |`, | ||
`| --- | --- |`, | ||
`| ${score(summaryTotal.performance)} Performance | ${summaryTotal.performance} |`, | ||
`| ${score(summaryTotal.accessibility)} Accessibility | ${summaryTotal.accessibility} |`, | ||
`| ${score(summaryTotal['best-practices'])} Best Practices | ${summaryTotal['best-practices']} |`, | ||
`| ${score(summaryTotal.seo)} SEO | ${summaryTotal.seo} |`, | ||
`| ${score(summaryTotal.pwa)} PWA | ${summaryTotal.pwa} |`, | ||
].join('\n'); | ||
core.setOutput('comment', comment) | ||
- name: Comment Lighthouse Report | ||
uses: unsplash/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
msg: ${{ steps.format_lighthouse_score.outputs.comment}} |
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,59 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: 'tsconfig.json', | ||
tsconfigRootDir: __dirname, | ||
sourceType: 'module', | ||
}, | ||
plugins: ['@typescript-eslint/eslint-plugin'], | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:import/recommended', | ||
'plugin:import/errors', | ||
'plugin:import/warnings', | ||
'plugin:import/typescript', | ||
'plugin:prettier/recommended', | ||
], | ||
root: true, | ||
env: { | ||
node: true, | ||
jest: true, | ||
}, | ||
ignorePatterns: ['.eslintrc.js'], | ||
rules: { | ||
'@typescript-eslint/interface-name-prefix': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'prettier/prettier': ['error', { endOfLine: 'auto' }], | ||
'import/order': [ | ||
'error', | ||
{ | ||
groups: ['builtin', 'external', 'internal'], | ||
pathGroups: [ | ||
{ | ||
pattern: '{express*,express*/**}', | ||
group: 'builtin', | ||
position: 'before', | ||
}, | ||
], | ||
pathGroupsExcludedImportTypes: [], | ||
'newlines-between': 'always', | ||
alphabetize: { | ||
order: 'asc', | ||
caseInsensitive: true, | ||
}, | ||
}, | ||
], | ||
}, | ||
settings: { | ||
'import/parsers': { | ||
'@typescript-eslint/parser': ['.ts', '.tsx'], | ||
}, | ||
'import/resolver': { | ||
typescript: { | ||
project: 'backend/tsconfig.json', | ||
}, | ||
}, | ||
}, | ||
}; |
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,5 @@ | ||
/node_modules | ||
/dist | ||
/env | ||
.env | ||
/prisma/migrations |
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,13 @@ | ||
{ | ||
"singleQuote": true, | ||
"printWidth": 100, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": true, | ||
"quoteProps": "as-needed", | ||
"trailingComma": "es5", | ||
"arrowParens": "always", | ||
"endOfLine": "lf", | ||
"bracketSpacing": true, | ||
"proseWrap": "preserve" | ||
} |
Oops, something went wrong.