Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,25 @@ module.exports = {
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
"rules": {
"@typescript-eslint/naming-convention": [
"warn",
// 변수명
{
"selector": "variable",
"format": ["camelCase", "PascalCase"]
},
// 함수명
{
"selector": "function",
"format": ["camelCase", "PascalCase"]
},
],
"quotes": ["error", "single"],
"semi": ["error", "always"],
"no-duplicate-imports": "error",
"no-console": ["warn", { "allow": ["warn", "error", "info"] }],
"no-unused-vars": "warn",
"no-multiple-empty-lines": "error"
},
}
48 changes: 48 additions & 0 deletions .github/workflow/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI/CD Pipeline

on:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Install dependencies
run: npm install

- name: Build project
run: npm run build

- name: Prepare deployment package
run: |
mkdir -p build/deployment
cp -r dist/* build/deployment/

- name: Deploy to Home Server
uses: appleboy/scp-action@v0.0.1
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
source: "build/deployment/*"
target: "/home/anhye0n/web/tutorial_sejong/frontend/dist"

- name: Restart Nginx
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
sudo systemctl restart nginx
19 changes: 19 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"arrowParens": "avoid",
"bracketSpacing": false,
"endOfLine": "auto",
"htmlWhitespaceSensitivity": "css",
"jsxBracketSameLine": false,
"jsxSingleQuote": true,
"printWidth": 80,
"proseWrap": "preserve",
"quoteProps": "consistent",
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": false,
"vueIndentScriptAndStyle": true,
"requirePragma": false,
"insertPragma": false
}
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<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>
<title>수강신청</title>
</head>
<body>
<div id="root"></div>
Expand Down
Loading