Skip to content

feat: 대시보드를 GitHub Pages(spot.roboco.io)로 이전 - #40

Merged
serithemage merged 1 commit into
mainfrom
feat/dashboard-github-pages
Oct 12, 2026
Merged

serithemage merged 1 commit into
mainfrom
feat/dashboard-github-pages

Conversation

@serithemage

Copy link
Copy Markdown
Contributor

배경

대시보드에 커스텀 도메인 spot.roboco.io를 붙이려고 ACM 인증서를 요청했지만 CAA_ERROR로 실패했다. roboco.io 루트에 CNAME → roboco-io.github.io가 있어 CAA 조회가 github.io로 넘어가고, github.io CAA는 Amazon을 허용하지 않기 때문이다. 루트 레코드는 다른 하위 도메인에 영향을 주므로 수정하지 않고, 대시보드 페이지만 GitHub Pages로 옮긴다.

변경

  • assets/dashboard/index.html: data.json을 CloudFront 절대 URL에서 가져온다. 피드에는 이미 CORS_ALLOW_ALL_ORIGINS가 적용되어 있어 CORS 변경은 없다.
  • .github/workflows/dashboard-pages.yml: assets/dashboard/ 변경 시 GitHub Pages로 배포한다.
  • 수집기 스택: CloudFront Function(viewer-request)이 /, /index.html만 https://spot.roboco.io로 301 리다이렉트한다. data.json(구버전 CLI의 feedUrl 포함)은 그대로 제공된다.
  • README 3종, docs/spot-feed.md의 대시보드 URL 갱신.

배포 순서 (리다이렉트가 먼저 켜지면 기존 URL이 깨지므로 순서 중요)

  1. 머지 → Pages 워크플로 배포
  2. 가비아에 CNAME spot → roboco-io.github.io. 추가, Pages HTTPS 인증서 발급 확인
  3. https://spot.roboco.io 동작 확인 후 npx cdk deploy -c collector=1로 리다이렉트 적용

테스트

  • npm test 146 통과, npm run build 통과

🤖 Generated with Claude Code

…리다이렉트

roboco.io 루트의 CNAME(→ github.io) 때문에 CAA 검사에서 ACM 발급이 거부되어,
대시보드 페이지는 GitHub Pages로 옮기고 data.json 피드는 CloudFront에 그대로 둔다.

- assets/dashboard/index.html: data.json을 CloudFront 절대 URL로 fetch (CORS 기존 전면 허용)
- .github/workflows/dashboard-pages.yml: assets/dashboard 변경 시 Pages 배포
- 수집기 스택: CloudFront Function으로 /, /index.html만 spot.roboco.io로 301
  (data.json과 구버전 CLI feedUrl은 영향 없음)
- README 3종·docs/spot-feed.md 대시보드 URL 갱신

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@codesolarlght codesolarlght Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔆 CodeSolar review 🟡 Minor notes

대시보드를 GitHub Pages로 이전하고 CloudFront에서 301 리다이렉트를 설정하는 변경. data.json 피드 URL이 index.html과 README들에 하드코딩되어 있어 CloudFront 배포가 재생성되면 대시보드가 끊어질 수 있는 결합(coupling) 문제가 있다.

Findings: 🟡 Low 1


solar-pro4 (openrouter) · 8 files · +78/-6 · 213.8s · CodeSolar

Comment /codesolar on this PR to re-run the review.


DATA = await (await fetch('./data.json?t=' + Math.floor(Date.now()/60000), {cache:'no-store'})).json();
// 대시보드는 GitHub Pages(spot.roboco.io), 데이터 피드는 CloudFront — 절대 URL로 교차 출처 fetch (피드는 CORS 전면 허용)
const FEED_URL = 'https://d16jdvzof4zpo7.cloudfront.net/data.json';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Low · design — 데이터 피드 URL이 특정 CloudFront 배포 도메인으로 하드코딩됨

index.html의 FEED_URL이 'https://d16jdvzof4zpo7.cloudfront.net/data.json'으로 하드코딩되어 있다. 이 URL은 수집기 스택의 DashboardCdnUrl 출력값(cloudfront.distributionDomainName)과 일치할 때만 유효하다. 수집기 스택이 destroy 후 recreate되면 CloudFront 배포 도메인이 바뀌므로 대시보드 fetch가 실패한다. README 3종과 docs/spot-feed.md에도 같은 URL이 하드코딩되어 있어 일관성 유지 부담도 있다. 데이터 피드에 커스텀 도메인(spot.roboco.io/data.json)을 쓰거나, URL을 설정 가능하게 만들면 이 결합을 해소할 수 있다.

🔆 CodeSolar

@serithemage
serithemage merged commit 602a8ab into main Oct 12, 2026
5 checks passed
@serithemage
serithemage deleted the feat/dashboard-github-pages branch October 12, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant