A webhook server to automatically deploy GitHub repositories
- Automated Deployments: Automatically deploy on GitHub push events
- Remote Deployments: Use ssh keys to deploy to remote servers
- Web Interface: Manually trigger deployments and view deployment logs
Clone Repo
git clone https://github.com/JDinABox/webhook-deploy.git
cd webhook-deployGenerate ssh key or add and existing one to the container
Edit docker-compose.yaml
Edit Config
Deploy
docker-compose up --build -dEdit Config
CONFIG="path/to/config.yaml" webhook-deployGo version: 1.25+
git clone https://github.com/JDinABox/webhook-deploy.git
cd webhook-deploy
docker build .Packages and binaries will be in the dist directory.
git clone https://github.com/JDinABox/webhook-deploy.git
cd webhook-deploy
GOEXPERIMENT=jsonv2 go build -o ./webhook-deploy ./cmd/webhook-deploy/TailwindCSS CLI
tailwindcss -m -o ./templates/assets/output.cssnpm | Bun
npm run build
bun run buildInstalled at /etc/webhook-deploy/config.yaml
listen: ":80" # Public port to listen on
ssh-known-hosts: "./path/to/known_hosts"
web-interface: # Web interface should not be exposed to the internet
enabled: true
listen: "127.0.0.1:9080"
username: "admin"
password: "password"
deployments:
user/repo:
remote:
user: "user"
server_ip: "server1"
private_key: "./path/to/private/key" # SSH private key
secret: "secret" # GitHub webhook secret
commands:
- /path/to/script.sh
- /path/to/other/script.sh
org/repo2:
remote:
user: "user"
server_ip: "server2"
private_key: "./path/to/private/key"
secret: "secret2"
commands:
- cd /path/to/project; git pull; docker-compose up --build -dOn https://github.com/user/repo/settings/hooks/new:
- Payload URL -
http(s)://{DOMAIN/IP}:{PORT}/webhook/push - Content type -
application/json - Secret -
deployments>user/repo>secret - Which events would you like to trigger this webhook? - Just the
pushevent - Active -
Checked
Tools:
- Go 1.25+
GOEXPERIMENT=jsonv2 go run ./cmd/webhook-deploy/ ./config/config.yaml
- TailwindCSS CLI - Web interface styles
tailwindcss -w -m -o ./templates/assets/output.css # or npm run dev - smee (Optional but Recommended) - Webhook proxy
Start
webhook-deploysmee --url https://smee.io/{URL} --path /webhook/push --port 8080

