내 블로그임. https://blog.tyange.com
  • Vue 50.8%
  • TypeScript 34.4%
  • CSS 13.3%
  • JavaScript 1.3%
  • HTML 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
tyange d2c9a26291 Ignore local .claude directory
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 15:23:15 +09:00
.github/workflows Drop Node.js setup from CI 2026-04-19 00:01:47 +09:00
.vscode - SSR에서의 markdown parsing을 위해 @nuxt/mdc로 되돌아갑니다. 2025-11-25 13:22:25 +09:00
app Switch to static deployment with nginx 2026-04-18 02:39:57 +09:00
public remove @nuxt/robots & made custom server route for robots.txt 2025-11-13 18:42:12 +09:00
server Switch posts list to /posts and consolidate hidden tags to lovelog 2026-06-28 15:22:27 +09:00
shared Switch posts list to /posts and consolidate hidden tags to lovelog 2026-06-28 15:22:27 +09:00
.gitignore Ignore local .claude directory 2026-06-28 15:23:15 +09:00
.prettierrc 나에 대한 정보를 추가해요 2025-06-17 08:47:30 +09:00
bun.lock Switch package manager from pnpm to bun 2026-04-18 23:58:06 +09:00
CLAUDE.md Switch posts list to /posts and consolidate hidden tags to lovelog 2026-06-28 15:22:27 +09:00
eslint.config.mjs added scroll indicator with intersection observer api 2025-11-10 17:32:21 +09:00
nuxt.config.ts Switch to static deployment with nginx 2026-04-18 02:39:57 +09:00
package.json Switch package manager from pnpm to bun 2026-04-18 23:58:06 +09:00
README.md Switch package manager from pnpm to bun 2026-04-18 23:58:06 +09:00
tsconfig.json re-init 2025-02-01 10:30:29 +09:00

tyange-blog

🚀 https://blog.tyange.com

제 블로그입니다.

(똥글 주의)

with Nuxt & Tailwind CSS & DaisyUI & Nuxt-MDC & Pinia

Deployment

master 브랜치에 푸시되면 GitHub Actions가 bun run generate로 정적 사이트를 빌드하고, Lightsail 서버의 nginx 루트에 .output/public 산출물을 배포한 뒤 nginx를 reload합니다.

이 빌드 과정에서 CMS API(NUXT_PUBLIC_TYANGE_CMS_API_BASE)를 다시 조회하므로, 게시글 publish/update/delete 이후 재배포가 실행되면 최신 콘텐츠 기준으로 prerender된 HTML과 rss.xml이 함께 갱신됩니다.

On-Demand Rebuild Trigger

CMS API는 GitHub의 repository_dispatch 엔드포인트를 호출해서 커밋 없이 재배포를 시작하면 됩니다.

  • HTTP endpoint: POST https://api.github.com/repos/tyange/tyange-blog/dispatches
  • 인증: Authorization: Bearer <TOKEN>
  • 권한: GitHub fine-grained PAT 기준 이 저장소의 Contents: write
  • 필수 body: { "event_type": "cms-content-changed" }
  • 선택 body: client_payload
  • 성공 응답: 204 No Content

예시 요청:

curl -L \
  -X POST \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer ${TYANGE_BLOG_REDEPLOY_TOKEN}" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/repos/tyange/tyange-blog/dispatches \
  -d '{
    "event_type": "cms-content-changed",
    "client_payload": {
      "source": "tyange-cms-api",
      "content_event": "publish",
      "post_id": "hello-world",
      "visibility": "visible"
    }
  }'

권장 payload 규약:

  • source: 호출 주체. 예: tyange-cms-api
  • content_event: publish, update, delete
  • post_id: 변경된 게시글 식별자
  • visibility: visible 또는 hidden

client_payload는 워크플로 로깅용이며 현재 배포 동작 자체는 event_type=cms-content-changed만으로 충분합니다.

Guardrails

같은 시점에 트리거가 여러 번 들어와도 워크플로의 concurrency가 tyange-blog-deploy 단일 그룹으로 묶여 있어서, 이전 실행은 취소되고 마지막 요청 기준 배포만 진행됩니다. 즉 중복 트리거는 대체로 harmless하며, 최종 상태만 남게 됩니다.

Verification

검증 포인트는 아래 순서입니다.

  1. CMS API에서 visible 게시글을 publish/update/delete 한다.
  2. CMS API가 위 repository_dispatch 호출로 재배포를 요청한다.
  3. GitHub Actions Deploy Nuxt to Lightsail 실행이 시작되고 Build 단계가 성공한다.
  4. 배포 완료 후 https://blog.tyange.com/rss.xml에서 변경된 게시글 항목이 반영됐는지 확인한다.
  5. 이후 tyange-cms-api의 RSS poller가 다음 주기(최대 300초 내)에서 새 feed item을 감지한다.

수동 점검이 필요하면 GitHub Actions의 workflow_dispatch로도 같은 배포를 직접 실행할 수 있습니다.