![[Pasted image 20260407165750.png]]

/home/dihwang/webhook/deploy.sh
```bash
#!/bin/bash

if [ -f /tmp/quartz.lock ]; then exit; fi

# 1. Node와 npx가 있는 경로를 강제로 주입 (v22.22.2 기준)
export PATH=$PATH:/home/dihwang/.nvm/versions/node/v22.22.2/bin

# 2. 작업 디렉토리로 이동
cd /home/dihwang/white-smith-blog/content || exit

# 3. 최신 데이터 동기화
git pull origin master

cd ..

# 4. Quartz 빌드 (이제 npx가 node를 잘 찾을 겁니다)
nice -n 19 npx quartz build

echo "Quartz Build Completed at $(date)"

```

/home/dihwang/webhook/hook.json
```json
[
  {
    "id": "quartz-deploy",
    "execute-command": "/home/dihwang/webhook/deploy.sh",
    "command-working-directory": "/home/dihwang/white-smith-blog",
    "response-message": "Deploying Quartz...",
  }
]

```