Skip to content

Commit 5669a87

Browse files
committed
chore: 프로젝트 설정 및 의존성 업데이트
- VitePress v1.6.4로 업그레이드 - TypeScript 설정 추가 - Prettier 설정 추가 - GitHub Actions 배포 워크플로우 설정 - .gitignore 업데이트 - 불필요한 README.md 제거
1 parent 7f21104 commit 5669a87

7 files changed

Lines changed: 1483 additions & 12864 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,53 @@ name: Deploy to GitHub Pages
22

33
on:
44
push:
5-
branches:
6-
- main
5+
branches: [main]
76
workflow_dispatch:
87

8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
16+
917
jobs:
10-
build-and-deploy:
18+
build:
1119
runs-on: ubuntu-latest
12-
1320
steps:
14-
- name: Checkout code
15-
uses: actions/checkout@v2
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
- name: Setup Node
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 22
29+
cache: npm
30+
- name: Setup Pages
31+
uses: actions/configure-pages@v4
1632

1733
- name: Install dependencies
18-
run: npm install
34+
run: npm ci
1935

20-
- name: Build project
21-
run: npm run build
36+
- name: Build with VitePress
37+
run: npm run docs:build
2238

23-
- name: Checkout gh-pages branch
24-
run: |
25-
git fetch origin gh-pages
26-
git checkout gh-pages || git checkout -b gh-pages
27-
28-
- name: Copy build files
29-
run: cp -r public/* .
39+
- name: Upload artifact
40+
uses: actions/upload-pages-artifact@v3
41+
with:
42+
path: docs/.vitepress/dist
3043

44+
deploy:
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deployment.outputs.page_url }}
48+
needs: build
49+
runs-on: ubuntu-latest
50+
name: Deploy
51+
steps:
3152
- name: Deploy to GitHub Pages
32-
env:
33-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34-
run: |
35-
git config user.name "github-actions"
36-
git config user.email "toothlessdev@users.noreply.github.com"
37-
git add .
38-
git commit -m "Deploy to GitHub Pages" || echo "No changes to commit"
39-
git push origin gh-pages --force
53+
id: deployment
54+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
node_modules/
2-
.cache/
3-
public
4-
src/gatsby-types.d.ts
1+
node_modules

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"printWidth": 100,
3+
"tabWidth": 4
4+
}

README.md

Lines changed: 0 additions & 49 deletions
This file was deleted.

package.json

Lines changed: 10 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,16 @@
11
{
2-
"name": "blog",
3-
"version": "1.0.0",
4-
"private": true,
5-
"description": "blog",
6-
"author": "toothlessdev",
7-
"keywords": [
8-
"gatsby"
9-
],
102
"scripts": {
11-
"develop": "gatsby develop",
12-
"start": "gatsby develop",
13-
"build": "gatsby build",
14-
"serve": "gatsby serve",
15-
"clean": "gatsby clean",
16-
"typecheck": "tsc --noEmit",
17-
"deploy": "gatsby build --prefix-paths && gh-pages -d public",
18-
"prettier": "prettier --write ."
19-
},
20-
"dependencies": {
21-
"@mdx-js/react": "^2.3.0",
22-
"@radix-ui/react-accordion": "^1.2.1",
23-
"@radix-ui/react-avatar": "^1.1.1",
24-
"@radix-ui/react-dialog": "^1.1.2",
25-
"@radix-ui/react-popover": "^1.1.2",
26-
"@radix-ui/react-select": "^2.1.2",
27-
"@radix-ui/react-slot": "^1.1.0",
28-
"@tailwindcss/typography": "^0.5.15",
29-
"autoprefixer": "^10.4.20",
30-
"class-variance-authority": "^0.7.0",
31-
"clsx": "^2.1.1",
32-
"cmdk": "^1.0.0",
33-
"dayjs": "^1.11.13",
34-
"gatsby": "^5.14.0",
35-
"gatsby-plugin-image": "^3.14.0",
36-
"gatsby-plugin-mdx": "^5.14.0",
37-
"gatsby-plugin-nprogress": "^5.14.0",
38-
"gatsby-plugin-postcss": "^6.14.0",
39-
"gatsby-plugin-sharp": "^5.14.0",
40-
"gatsby-remark-autolink-headers": "^6.14.0",
41-
"gatsby-remark-images": "^7.14.0",
42-
"gatsby-remark-mdx-relative-images": "^1.1.1",
43-
"gatsby-remark-relative-images": "^2.0.5",
44-
"gatsby-remark-relative-images-v2": "^0.1.5",
45-
"gatsby-source-filesystem": "^5.14.0",
46-
"gatsby-transformer-remark": "^6.14.0",
47-
"gatsby-transformer-sharp": "^5.14.0",
48-
"gh-pages": "^6.2.0",
49-
"lucide-react": "^0.456.0",
50-
"postcss": "^8.4.49",
51-
"prism-react-renderer": "^2.4.0",
52-
"react": "^18.2.0",
53-
"react-dom": "^18.2.0",
54-
"tailwind-merge": "^2.5.4",
55-
"tailwindcss": "^3.4.14",
56-
"tailwindcss-animate": "^1.0.7"
3+
"docs:dev": "vitepress dev",
4+
"docs:build": "vitepress build",
5+
"docs:preview": "vitepress preview",
6+
"generate-posts": "node scripts/generate-posts.mjs"
577
},
588
"devDependencies": {
59-
"@types/node": "^20.11.19",
60-
"@types/react": "^18.2.55",
61-
"@types/react-dom": "^18.2.19",
62-
"gatsby-plugin-alias-imports": "^1.0.5",
63-
"prettier": "^3.3.3",
64-
"prettier-plugin-tailwindcss": "^0.6.8",
65-
"typescript": "^5.3.3"
9+
"@types/node": "^24.5.2",
10+
"fast-glob": "^3.3.3",
11+
"glob": "^11.0.3",
12+
"gray-matter": "^4.0.3",
13+
"prettier": "^3.6.2",
14+
"vitepress": "^1.6.4"
6615
}
6716
}

tsconfig.json

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
{
22
"compilerOptions": {
3-
"target": "esnext",
4-
"lib": ["dom", "esnext"],
5-
"jsx": "react",
6-
"module": "esnext",
7-
"moduleResolution": "node",
8-
"esModuleInterop": true,
9-
"forceConsistentCasingInFileNames": true,
10-
"strict": true,
3+
"target": "ES2020",
4+
"useDefineForClassFields": true,
5+
"module": "ESNext",
6+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
117
"skipLibCheck": true,
12-
13-
"typeRoots": ["node_modules", "@types"],
14-
15-
"baseUrl": "src",
16-
"paths": {
17-
"@/*": ["./*"]
18-
}
8+
"moduleResolution": "bundler",
9+
"allowImportingTsExtensions": true,
10+
"resolveJsonModule": true,
11+
"isolatedModules": true,
12+
"noEmit": true,
13+
"jsx": "preserve",
14+
"strict": true,
15+
"noUnusedLocals": false,
16+
"noUnusedParameters": false,
17+
"noFallthroughCasesInSwitch": true,
18+
"types": ["node"]
1919
},
20-
"include": ["./src/**/*", "./gatsby-node.ts", "./gatsby-config.ts", "./plugins/**/*", "@types"]
20+
"include": [".vitepress/**/*", "pages/**/*", ".vitepress/theme/vue-shims.d.ts"],
21+
"exclude": ["node_modules", "dist"]
2122
}

0 commit comments

Comments
 (0)