fix: 글이 조용히 깨지거나 일시 오류로 배포가 멈추는 경우 막기 - #16
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
작성자 표시(#15)를 붙인 뒤 점검에서 나온 네 가지를 고칩니다. 지금 운영 중인 글에는 문제가 없고, 조건이 맞으면 생길 수 있던 문제를 코드로 막습니다.
check.yml). 배포는 하지 않는다pubDatetime이 미래면 글이 조용히 빠졌다. 시간대를 빼면 9시간 늦게 발행됐다## 목차뒤 문장, raw<details>,public/이미지, GIF가 빌드를 그냥 통과했다바뀐 것
src/utils/checkPosts.ts(새 파일): 빌드 시작 전에 초안을 뺀 모든 글을 검사하는 Astro 통합입니다. 걸리면 파일과 줄을 알려 주고 빌드를 멈춥니다.pnpm build, PR 검사, 배포 빌드가 모두 거칩니다. 웹 편집기로main에 바로 저장한 글도 배포 빌드에서 걸리고, 사이트는 이전 배포에 머뭅니다src/utils/toc.ts규칙을 씁니다astro.config.ts: 위 검사를integrations에 넣었습니다src/utils/postAuthors.ts: 재시도를 넣었습니다. 5xx, 10초 시간 초과, 1분 이하의retry-after만 다시 요청합니다. 404나 시간당 한도 소진은 바로 멈춥니다. 로컬 빌드는 실패해도 작성자 줄만 빠지므로 다시 요청하지 않습니다.github/workflows/check.yml(새 파일): PR 빌드입니다.deploy.yml과 같은withastro/action@v6을 써서 여기서 통과하면 배포 빌드도 통과합니다AGENTS.md: 발행 흐름을 PR로 바꾸고, 발행 시각 규칙과 "빌드가 막는 것" 절, 봇 발행과 일괄 수정 주의점을 적었습니다커밋은 항목별로 나눴습니다(fix, feat, ci, docs).
검증
pnpm build:astro check오류, 경고, 힌트 0.[check-posts] 글 2편 검사 통과. 빌드와 검색 색인 정상astro build: 3건을 파일과 줄 번호로 알리고 멈췄습니다. 임시 글은 지웠습니다로그에
[check-posts] 글 2편 검사 통과가 찍혔고, 결과물의 두 글 모두작성: Aiden / 최근 수정: Aiden입니다검사 판정 경우
@/assets이미지)## 목차뒤 문장, 목차 뒤###소절## Table of Contents,## **목차**## 목차<details>, 하위 폴더 글의<details><details>/로 시작하는 이미지(마크다운,<img>, 콜아웃 안)src/assets와public의 GIF 파일modDatetime: nullmodDatetime_로 시작하는 파일재시도 경우
retry-after: 1retry-after: 120리뷰 포인트
pubDatetime은 배포 빌드도 멈춥니다. 웹 편집기로 미래 시각의 글을 저장하면 시각을 고치거나 그 시각이 지나 다시 배포할 때까지 다른 변경도 배포되지 않습니다. 글이 조용히 빠지는 것보다 낫다고 판단했습니다check.yml은 배포 액션을 그대로 써서 PR마다 Pages용 아티팩트를 한 번 올립니다. 배포에는 쓰이지 않고 하루 뒤 지워집니다main직접 커밋도 막힐 수 있어 따로 정할 일입니다