diff --git a/config.json b/config.json index 800b736..8208699 100644 --- a/config.json +++ b/config.json @@ -1,18 +1,24 @@ [ { "id": "sexy-push", - "execute-command": "{{ getenv "WEBHOOK_SCRIPT_DIR" }}/deploy-branch.sh", + "execute-command": "{{ getenv "WEBHOOK_SCRIPT_DIR" }}/deploy.sh", "command-working-directory": "/home/web/crux.sexy/", - "pass-arguments-to-command": [ - { - "source": "payload", - "name": "repository.name" - }, - { - "source": "payload", - "name": "ref" + "response-message": "Updating...", + "trigger-rule": { + "match": { + "type": "value", + "value": "{{ getenv "WEBHOOK_SECRET" | js }}", + "parameter": { + "source": "payload", + "name": "secret" + } } - ], + } + }, + { + "id": "webhook-push", + "execute-command": "{{ getenv "WEBHOOK_SCRIPT_DIR" }}/deploy.sh", + "command-working-directory": "/home/web/webhooks/", "response-message": "Updating...", "trigger-rule": { "match": { diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..4f64a71 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,3 @@ +#! /bin/bash + +git pull \ No newline at end of file