2022-10-28 16:47:34 +00:00
|
|
|
---
|
|
|
|
# Webhook for Github.
|
|
|
|
- id: github
|
|
|
|
execute-command: /etc/hugo/deploy.sh
|
|
|
|
command-working-directory: /tmp
|
|
|
|
include-command-output-in-response: true
|
|
|
|
include-command-output-in-response-on-error: true
|
|
|
|
pass-arguments-to-command:
|
|
|
|
- source: payload
|
|
|
|
name: repository.ssh_url
|
|
|
|
- source: string
|
2022-10-29 14:46:15 +00:00
|
|
|
name: ${HUGO_DEPLOY_DEFAULT_BRANCH}
|
2022-10-28 16:47:34 +00:00
|
|
|
trigger-rule:
|
|
|
|
and:
|
|
|
|
- match:
|
|
|
|
type: payload-hmac-sha256
|
|
|
|
secret: ${HUGO_DEPLOY_SECRET}
|
|
|
|
parameter:
|
|
|
|
source: header
|
|
|
|
name: X-Hub-Signature-256
|
|
|
|
- match:
|
|
|
|
type: value
|
2022-10-29 14:46:15 +00:00
|
|
|
value: refs/heads/${HUGO_DEPLOY_DEFAULT_BRANCH}
|
2022-10-28 16:47:34 +00:00
|
|
|
parameter:
|
|
|
|
source: payload
|
|
|
|
name: ref
|
|
|
|
# Webhook for Gitea.
|
|
|
|
- id: gitea
|
|
|
|
execute-command: /etc/hugo/deploy.sh
|
|
|
|
command-working-directory: /tmp
|
|
|
|
include-command-output-in-response: true
|
|
|
|
include-command-output-in-response-on-error: true
|
|
|
|
pass-arguments-to-command:
|
|
|
|
- source: payload
|
|
|
|
name: repository.ssh_url
|
2022-10-29 14:46:15 +00:00
|
|
|
- source: payload
|
|
|
|
name: ref
|
2022-10-28 16:47:34 +00:00
|
|
|
trigger-rule:
|
|
|
|
and:
|
|
|
|
- match:
|
|
|
|
type: payload-hmac-sha256
|
|
|
|
secret: ${HUGO_DEPLOY_SECRET}
|
|
|
|
parameter:
|
|
|
|
source: header
|
|
|
|
name: X-Hub-Signature-256
|
|
|
|
# Webhook for Gitlab.
|
|
|
|
- id: gitlab
|
|
|
|
execute-command: /etc/hugo/deploy.sh
|
|
|
|
command-working-directory: /tmp
|
|
|
|
include-command-output-in-response: true
|
|
|
|
include-command-output-in-response-on-error: true
|
|
|
|
pass-arguments-to-command:
|
|
|
|
- source: payload
|
|
|
|
name: repository.git_ssh_url
|
2022-10-29 14:46:15 +00:00
|
|
|
- source: payload
|
|
|
|
name: ref
|
2022-10-28 16:47:34 +00:00
|
|
|
trigger-rule:
|
|
|
|
and:
|
|
|
|
- match:
|
|
|
|
type: value
|
|
|
|
value: ${HUGO_DEPLOY_SECRET}
|
|
|
|
parameter:
|
|
|
|
source: header
|
|
|
|
name: X-Gitlab-Token
|