Skip to content

Commit f95368a

Browse files
kickbelldevclaude
andauthored
feat: GitHub Actions CI/CD 워크플로우 추가 (#1)
* docs: CLAUDE.md 파일 추가 향후 Claude Code 인스턴스를 위한 개발 가이드 문서 추가 - 프로젝트 아키텍처 및 핵심 기술 스택 정보 - 개발 명령어 및 코드 품질 도구 설정 안내 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * feat: gray-matter, @tailwindcss/typography 의존성 추가 - gray-matter: MDX 프론트매터 파싱을 위한 라이브러리 - @tailwindcss/typography: 블로그 포스트 스타일링을 위한 Tailwind 플러그인 - dev 스크립트에서 --turbopack 옵션 제거 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * feat: 블로그 기능 구현 - src/api/posts.ts: MDX 파일 읽기 및 파싱 API - src/app/blog/[slug]/: 동적 블로그 포스트 페이지 - src/app/about/: About 페이지 추가 - src/app/not-found.tsx: 404 페이지 추가 - src/contents/: MDX 블로그 포스트 예시 파일들 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * config: Next.js MDX 설정 수정 - MDX 파일 확장자를 .mdx로 제한 (.md 제거) - 더 명확한 MDX 파일 처리를 위한 설정 개선 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * config: Biome 및 VSCode 설정 업데이트 - Biome 스키마 버전 2.1.1로 업데이트 - VSCode Biome 확장 설정 개선 (quickfix.biome → source.fixAll.biome) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * config: 컴포넌트 경로 및 TypeScript 설정 수정 - components.json: shadcn/ui 경로 구조를 app 디렉토리 기반으로 변경 - tsconfig.json: @/app/* 경로 별칭 추가 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * refactor: UI 정리 및 테스트 파일 제거 - 홈페이지 링크를 새로운 about, blog 페이지로 변경 - globals.css에서 불필요한 테마 변수 및 스타일 제거 - mdx-test 디렉토리 및 파일 삭제 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * feat: GitHub Actions CI/CD 워크플로우 추가 - CI 워크플로우: 코드 품질 검사 및 빌드 테스트 - Deploy 워크플로우: GitHub Pages 자동 배포 - pnpm, Node.js 20, 최신 액션 버전 사용 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * fix: GitHub Actions에서 pnpm 버전 설정 제거 package.json에서 packageManager로 버전 관리되므로 워크플로우에서 명시적 버전 설정 불필요 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
1 parent d41ce7c commit f95368a

File tree

20 files changed

+555
-167
lines changed

20 files changed

+555
-167
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
quality-check:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup pnpm
18+
uses: pnpm/action-setup@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: '20'
24+
cache: 'pnpm'
25+
26+
- name: Install dependencies
27+
run: pnpm install --frozen-lockfile
28+
29+
- name: Run Biome checks
30+
run: pnpm biome:check
31+
32+
- name: Type check
33+
run: pnpm tsc --noEmit
34+
35+
- name: Build
36+
run: pnpm build
37+
38+
- name: Upload build artifacts
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: build-output
42+
path: out/
43+
retention-days: 1

.github/workflows/deploy.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup pnpm
26+
uses: pnpm/action-setup@v4
27+
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: '20'
32+
cache: 'pnpm'
33+
34+
- name: Setup Pages
35+
uses: actions/configure-pages@v4
36+
with:
37+
static_site_generator: next
38+
39+
- name: Install dependencies
40+
run: pnpm install --frozen-lockfile
41+
42+
- name: Build with Next.js
43+
run: pnpm build
44+
45+
- name: Upload artifact
46+
uses: actions/upload-pages-artifact@v3
47+
with:
48+
path: ./out
49+
50+
deploy:
51+
environment:
52+
name: github-pages
53+
url: ${{ steps.deployment.outputs.page_url }}
54+
runs-on: ubuntu-latest
55+
needs: build
56+
steps:
57+
- name: Deploy to GitHub Pages
58+
id: deployment
59+
uses: actions/deploy-pages@v4

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"biome.requireConfiguration": true,
33
"editor.codeActionsOnSave": {
4-
"quickfix.biome": "explicit",
4+
"source.fixAll.biome": "explicit",
55
"source.organizeImports.biome": "explicit"
66
},
77
"editor.defaultFormatter": "biomejs.biome",

CLAUDE.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Development Commands
6+
7+
- `pnpm dev` - Start development server on localhost:3000
8+
- `pnpm build` - Build the application for production (configured for static export)
9+
- `pnpm start` - Start production server
10+
- `pnpm biome:check` - Run Biome formatter and linter with auto-fix
11+
- `pnpm biome:staged` - Run Biome on staged files only
12+
13+
## Code Quality
14+
15+
This project uses Biome for formatting and linting. Always run `pnpm biome:check` before committing changes. The project has a pre-commit hook (lefthook) that automatically runs Biome on staged files.
16+
17+
## Architecture Overview
18+
19+
### Next.js Blog with MDX
20+
21+
This is a Next.js 15 blog application configured for static export with MDX support for content authoring.
22+
23+
**Key Technologies:**
24+
- Next.js 15 with App Router
25+
- MDX for blog content with rehype-pretty-code syntax highlighting
26+
- Tailwind CSS for styling
27+
- TypeScript
28+
- Biome for code formatting/linting
29+
30+
### Directory Structure
31+
32+
- `src/app/` - Next.js App Router pages and layouts
33+
- `src/contents/` - MDX blog posts (*.mdx files)
34+
- `src/api/posts.ts` - Blog post data fetching utilities
35+
- `src/app/blog/[slug]/` - Dynamic blog post pages
36+
37+
### Content Management
38+
39+
Blog posts are stored as MDX files in `src/contents/`. The `src/api/posts.ts` module handles:
40+
- Reading MDX files from the contents directory
41+
- Parsing frontmatter with gray-matter
42+
- Generating static routes for blog posts
43+
44+
### Static Generation
45+
46+
The app is configured for static export (`output: 'export'` in next.config.ts) and uses:
47+
- `generateStaticParams()` for blog post routes
48+
- Dynamic imports for MDX components in blog pages
49+
50+
### Styling
51+
52+
- Uses Tailwind CSS with custom configuration
53+
- Noto Sans KR font for Korean language support
54+
- Prose styling for blog content rendering
55+
56+
### Build Output
57+
58+
Static files are generated in the `out/` directory during build.

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.0.6/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.1.1/schema.json",
33
"vcs": {
44
"enabled": true,
55
"clientKind": "git",

components.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
"tsx": true,
66
"tailwind": {
77
"config": "",
8-
"css": "src/app/globals.css",
8+
"css": "src/app/_styles/globals.css",
99
"baseColor": "stone",
1010
"cssVariables": true,
1111
"prefix": ""
1212
},
1313
"aliases": {
14-
"components": "@/components",
15-
"utils": "@/lib/utils",
16-
"ui": "@/components/ui",
17-
"lib": "@/lib",
18-
"hooks": "@/hooks"
14+
"components": "@/app/_components",
15+
"utils": "@/app/_lib/utils",
16+
"ui": "@/app/_components/ui",
17+
"lib": "@/app/_lib",
18+
"hooks": "@/app/_hooks"
1919
},
2020
"iconLibrary": "lucide"
2121
}

next.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const nextConfig: NextConfig = {
1515
}
1616

1717
const withMDX = createMDX({
18-
extension: /\.(md|mdx)$/,
18+
extension: /\.(mdx)$/,
1919
options: {
2020
rehypePlugins: [
2121
[

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {
6-
"dev": "next dev --turbopack",
6+
"dev": "next dev",
77
"build": "next build",
88
"start": "next start",
99
"biome:check": "biome check --write --verbose",
@@ -16,6 +16,7 @@
1616
"@types/mdx": "^2.0.13",
1717
"class-variance-authority": "^0.7.1",
1818
"clsx": "^2.1.1",
19+
"gray-matter": "^4.0.3",
1920
"lucide-react": "^0.525.0",
2021
"next": "15.3.5",
2122
"react": "^19.1.0",
@@ -26,6 +27,7 @@
2627
"devDependencies": {
2728
"@biomejs/biome": "^2.1.1",
2829
"@tailwindcss/postcss": "^4.1.11",
30+
"@tailwindcss/typography": "^0.5.16",
2931
"@types/node": "^20.19.7",
3032
"@types/react": "^19.1.8",
3133
"@types/react-dom": "^19.1.6",

0 commit comments

Comments
 (0)