Skip to content

Commit 552af4d

Browse files
committed
배포 설정 추가
1 parent 76ad4c3 commit 552af4d

19 files changed

Lines changed: 2886 additions & 717 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
permissions:
9+
pages: write
10+
id-token: write
11+
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-24.04
15+
environment:
16+
name: github-pages
17+
url: ${{ steps.deploy.outputs.page_url }}
18+
steps:
19+
- uses: actions/checkout@v6.0.2
20+
with:
21+
fetch-depth: 0
22+
- uses: actions/setup-node@v4
23+
with:
24+
node-version: 22
25+
cache: npm
26+
cache-dependency-path: obsidian-site-action/package-lock.json
27+
- name: Install dependencies
28+
run: npm ci
29+
working-directory: obsidian-site-action
30+
- name: Build
31+
run: npm run build -- --source ..
32+
working-directory: obsidian-site-action
33+
- name: Upload artifact
34+
uses: actions/upload-pages-artifact@v3
35+
with:
36+
path: ./public
37+
- name: Deploy
38+
id: deploy
39+
uses: actions/deploy-pages@v4
40+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
public/
22
__pycache__/
33
*.pyc
4+
node_modules/

.obsidian/workspace.json

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,12 @@
150150
"state": {
151151
"type": "outline",
152152
"state": {
153-
"file": "cloud-computing.md",
154153
"followCursor": false,
155154
"showSearch": false,
156155
"searchQuery": ""
157156
},
158157
"icon": "lucide-list",
159-
"title": "Outline of cloud-computing"
158+
"title": "Outline"
160159
}
161160
}
162161
]
@@ -177,43 +176,43 @@
177176
"bases:Create new base": false
178177
}
179178
},
180-
"active": "730a63a34b080c52",
179+
"active": "2adff69548cf1dc0",
181180
"lastOpenFiles": [
182-
"README.md.tmp.44349.1772225860658",
183-
"CLAUDE.md.tmp.43679.1772225769011",
184-
"content/xml-injection.md",
185-
"content/wise-saying.md",
186-
"content/windows-command.md",
187-
"content/wiki.md",
188-
"content/wget.md",
189-
"content/web-shell.md",
190-
"content/webpack.md",
191-
"content/web-2.0.md",
192-
"content/volley.md",
193-
"content/virtualization.md",
194-
"content/vi.md",
195-
"content/vert-x.md",
196-
"content/versioning.md",
197-
"content/vcs.md",
198-
"content/uuid.md",
199-
"content/utility-service.md",
200-
"content/uml.md",
201-
"content/ui-test.md",
202-
"content/ui-framework.md",
203-
"content/ui-design.md",
204-
"content/tshark.md",
205-
"content/tomcat.md",
206-
"content/toby-spring.md",
207-
"content/test.md",
208-
"content/test-framework.md",
209-
"content",
210-
"CLAUDE.md.tmp.34340.1772225399793",
211-
"README.md.tmp.34340.1772225380135",
212-
"dist/style.css",
213-
"dist/index.html",
214-
"dist/xml-injection.html",
215-
"dist/wise-saying.html",
216-
"dist/windows-command.html",
217-
"dist/wiki.html"
181+
"cloud-computing.md",
182+
"Untitled",
183+
"CLAUDE.md.tmp.101705.1772265506503",
184+
"CLAUDE.md.tmp.101705.1772265499378",
185+
"CLAUDE.md.tmp.101705.1772265496374",
186+
"README.md.tmp.101705.1772265486516",
187+
"README.md.tmp.101705.1772265482729",
188+
"obsidian-site-action/styles/style.css.tmp.101705.1772264656819",
189+
"CLAUDE.md.tmp.101705.1772264380179",
190+
"CLAUDE.md.tmp.101705.1772264370841",
191+
"obsidian-site-action/build.ts.tmp.101705.1772264368252",
192+
"obsidian-site-action/node_modules/@vitest/snapshot/README.md",
193+
"obsidian-site-action/node_modules/vitest/README.md",
194+
"obsidian-site-action/node_modules/rollup/README.md",
195+
"obsidian-site-action/node_modules/vitest/LICENSE.md",
196+
"obsidian-site-action/node_modules/rollup/LICENSE.md",
197+
"obsidian-site-action/node_modules/magic-string/README.md",
198+
"obsidian-site-action/node_modules/@types/chai/README.md",
199+
"obsidian-site-action/node_modules/@vitest/mocker/README.md",
200+
"obsidian-site-action/node_modules/@vitest/runner/README.md",
201+
"obsidian-site-action/node_modules/chai/README.md",
202+
"obsidian-site-action/node_modules/@vitest/expect/README.md",
203+
"obsidian-site-action/node_modules/estree-walker/README.md",
204+
"obsidian-site-action/node_modules/@vitest/spy/README.md",
205+
"obsidian-site-action/node_modules/vite/README.md",
206+
"obsidian-site-action/node_modules/vite/LICENSE.md",
207+
"obsidian-site-action/node_modules/debug/README.md",
208+
"obsidian-site-action/node_modules/picomatch/README.md",
209+
"obsidian-site-action/node_modules/tinyexec/README.md",
210+
"obsidian-site-action/node_modules/pathe/README.md",
211+
"obsidian-site-action/node_modules/tinybench/README.md",
212+
"obsidian-site-action/node_modules/expect-type/SECURITY.md",
213+
"obsidian-site-action/node_modules/expect-type/README.md",
214+
"obsidian-site-action/node_modules/tinypool/README.md",
215+
"obsidian-site-action/node_modules/std-env/README.md",
216+
"obsidian-site-action/node_modules/tinyspy/README.md"
218217
]
219218
}

CLAUDE.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,29 @@
22

33
## 프로젝트 개요
44

5-
Obsidian vault 기반 개발 노트 모음. `obsidian-graph-site/`의 빌드 도구로 정적 웹사이트를 생성한다.
5+
Obsidian vault 기반 개발 노트 모음. `obsidian-site-action/`의 빌드 도구로 정적 웹사이트를 생성한다.
66

77
## 핵심 구조
88

99
- `content/*.md` — 270개 마크다운 노트 (플랫 구조)
1010
- `site.json` — 사이트 설정 (title, subtitle, lang, output)
11-
- `obsidian-graph-site/` — 빌드 도구 (추후 별도 repo로 분리 예정)
12-
- `build.py` — 진입점. `Path(__file__).parent` 기준으로 templates/static을 찾고, vault 경로는 `--source`로 받음
13-
- `templates/page.html`, `templates/index.html` — HTML 템플릿. `{title}`, `{body}` 등 플레이스홀더 사용
14-
- `static/style.css` — 공유 스타일시트
11+
- `obsidian-site-action/` — 빌드 도구 (추후 별도 repo로 분리 예정)
12+
- `build.ts` — 진입점. `import.meta.url` 기준으로 layouts/styles를 찾고, vault 경로는 `--source`로 받음
13+
- `layouts/page.html`, `layouts/index.html` — HTML 템플릿. `{title}`, `{body}` 등 플레이스홀더 사용
14+
- `styles/style.css` — 공유 스타일시트
1515
- `public/` — 빌드 결과물 (gitignored)
1616

1717
## 빌드 & 테스트
1818

1919
```bash
2020
# 빌드
21-
python3 obsidian-graph-site/build.py
21+
cd obsidian-site-action && npm run build -- --source ..
2222

2323
# 로컬 미리보기
2424
python3 -m http.server 8000 -d public
2525

2626
# 다른 vault에 대해 실행
27-
python3 obsidian-graph-site/build.py --source /path/to/vault --output dist
27+
npm run build -- --source /path/to/vault --output dist
2828
```
2929

3030
## 노트 컨벤션
@@ -37,10 +37,9 @@ python3 obsidian-graph-site/build.py --source /path/to/vault --output dist
3737

3838
## 빌드 도구 분리 전략
3939

40-
`obsidian-graph-site/` 디렉토리를 그대로 별도 repo로 옮기면 됨. build.py가 vault 경로를 CLI 인자로 받으므로 물리적 위치와 무관하게 동작.
40+
`obsidian-site-action/` 디렉토리를 그대로 별도 repo로 옮기면 됨. build.ts가 vault 경로를 CLI 인자로 받으므로 물리적 위치와 무관하게 동작.
4141

4242
## 주의사항
4343

4444
- `public/`은 gitignored. 커밋하지 않는다
45-
- `obsidian-graph-site/` 수정 시, 이 디렉토리가 별도 repo로 분리될 수 있음을 고려. vault에 종속적인 로직은 피한다
46-
- markdown 라이브러리가 없으면 내장 fallback 변환기를 사용하지만 품질이 떨어짐. `pip install markdown` 권장
45+
- `obsidian-site-action/` 수정 시, 이 디렉토리가 별도 repo로 분리될 수 있음을 고려. vault에 종속적인 로직은 피한다

README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22

33
정상혁의 개발수첩
44

5-
Obsidian vault로 관리하는 개발 노트 모음. `obsidian-graph-site`를 이용해 정적 웹사이트로 빌드할 수 있다.
5+
Obsidian vault로 관리하는 개발 노트 모음. `obsidian-site-action`를 이용해 정적 웹사이트로 빌드할 수 있다.
66

77
## 정적 사이트 빌드
88

99
### 요구사항
1010

11-
- Python 3.10+
12-
- `markdown` 라이브러리 (없으면 내장 fallback 변환기 사용)
11+
- Node.js 18+
12+
- npm
1313

1414
### 빌드
1515

1616
```bash
17-
pip install -r obsidian-graph-site/requirements.txt
18-
python3 obsidian-graph-site/build.py
17+
cd obsidian-site-action && npm install
18+
npm run build -- --source /path/to/vault
1919
```
2020

2121
### 로컬 미리보기
@@ -29,8 +29,8 @@ python3 -m http.server 8000 -d public
2929
### CLI 옵션
3030

3131
```bash
32-
python3 obsidian-graph-site/build.py --source /path/to/vault # vault 경로 지정
33-
python3 obsidian-graph-site/build.py --output dist # 출력 디렉토리 변경
32+
npm run build -- --source /path/to/vault # vault 경로 지정
33+
npm run build -- --output dist # 출력 디렉토리 변경
3434
```
3535

3636
### 설정
@@ -51,14 +51,16 @@ python3 obsidian-graph-site/build.py --output dist # 출력 디렉
5151
```
5252
content/*.md # Obsidian 노트 (플랫 구조)
5353
site.json # 사이트 설정
54-
obsidian-graph-site/ # 빌드 도구
55-
build.py # 빌드 스크립트
56-
templates/ # HTML 템플릿
54+
obsidian-site-action/ # 빌드 도구
55+
build.ts # 빌드 스크립트 (진입점)
56+
render.ts # HTML 렌더링
57+
graph.ts # 그래프/백링크 생성
58+
layouts/ # HTML 템플릿
5759
page.html # 개별 페이지
5860
index.html # 메인 페이지 (D3 그래프)
59-
static/
61+
styles/
6062
style.css # 스타일시트
61-
requirements.txt # Python 의존성
63+
package.json # Node.js 의존성
6264
public/ # 빌드 결과물 (gitignored)
6365
```
6466

0 commit comments

Comments
 (0)