[
  {
    "id": "deploy",
    "execute-command": "/etc/webhook/deploy.sh",
    "command-working-directory": "/repo",
    "include-command-output-in-response": true,
    "trigger-rule": {
      "and": [
        {
          "match": {
            "type": "value",
            "value": "refs/heads/main",
            "parameter": {
              "source": "payload",
              "name": "ref"
            }
          }
        },
        {
          "match": {
            "type": "payload-hmac-sha256",
            "secret": "${WEBHOOK_SECRET}",
            "parameter": {
              "source": "header",
              "name": "X-Gitea-Signature"
            }
          }
        }
      ]
    }
  }
]
