Skip to content

Commit

Permalink
wiki update 는 이벤트 형식이 다름, 링크 참고
Browse files Browse the repository at this point in the history
  • Loading branch information
deptno committed Oct 1, 2023
1 parent daf9cf8 commit 7f2d0cd
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions apps/wiki/app/webhook/github/POST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ export async function POST(request: NextRequest, { params }: Params) {
console.debug({ file, params })
request.json()
.then((payload) => {
console.debug('json', payload)
if (payload) {
console.debug('github webhook payload: ', payload)

if (
payload.ref === 'refs/heads/main'
|| payload.ref === 'refs/heads/master'
) {
restart()
if (payload.ref === 'refs/heads/main') { // push deptno
restart()
}
if (payload.pages) { // push wiki
restart()
}
}
})

Expand Down

0 comments on commit 7f2d0cd

Please sign in to comment.