Skip to content

Commit efb8273

Browse files
committed
refactor: 배포 워크플로우에서 새 글 알림 단계 제거
1 parent 11776ae commit efb8273

1 file changed

Lines changed: 0 additions & 24 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -96,30 +96,6 @@ jobs:
9696
docker rm blog-${{ steps.color.outputs.current }} || true
9797
docker rmi blog:${{ steps.color.outputs.current }} || true
9898
99-
- name: Notify subscribers on new post
100-
if: success()
101-
env:
102-
NOTIFY_API_KEY: ${{ secrets.NOTIFY_API_KEY }}
103-
run: |
104-
echo "=== DEBUG ==="
105-
echo "KEY_LENGTH=${#NOTIFY_API_KEY}"
106-
NEW_POST=$(git log --diff-filter=A --name-only --format= HEAD~5..HEAD -- 'content/posts/*.md' 'content/posts/**/*.md' 2>/dev/null | grep '\.md$' | head -1 || true)
107-
echo "NEW_POST=$NEW_POST"
108-
if [ -n "$NEW_POST" ] && [ -f "$NEW_POST" ]; then
109-
TITLE=$(grep -m1 '^title:' "$NEW_POST" 2>/dev/null | sed 's/^title:[[:space:]]*//' | tr -d '"' || basename "$NEW_POST" .md)
110-
REL=${NEW_POST#content/posts/}
111-
SLUG=${REL%.md}
112-
echo "SLUG=$SLUG"
113-
PAYLOAD=$(jq -n --arg title "$TITLE" --arg slug "$SLUG" --arg url "https://koala.ai.kr/posts/$SLUG" --arg key "$NOTIFY_API_KEY" \
114-
'{"title":$title,"slug":$slug,"url":$url,"api_key":$key}')
115-
RESULT=$(curl -s -X POST https://api.koala.ai.kr/subscribe/notify \
116-
-H 'Content-Type: application/json' \
117-
-d "$PAYLOAD")
118-
echo "RESULT=$RESULT"
119-
else
120-
echo "새 글 없음 또는 파일 미존재"
121-
fi
122-
12399
- name: Notify self-healing
124100
if: failure()
125101
run: |

0 commit comments

Comments
 (0)