Continuous Deployment: Auto-Deploying to VPS via GitHub Webhooks
Trigger automatic git pulls, builds, and graceful process restarts upon every repository push.
Yoxlanıldığı versiya
- Git
- 2.34+
- Node.js
- 20+
- Son yoxlama
- 2026-09-13
Bu səhifədə
Bütün bələdçilər
Eliminate repetitive manual SSH logins for git pull and service restarts. GitHub Webhooks notify your server on every commit push, triggering automated deployment workflows.
1. Lightweight Webhook Receiver#
const http = require('http');
const { exec } = require('child_process');
http.createServer((req, res) => {
if (req.method === 'POST' && req.url === '/webhook/deploy') {
console.log('GitHub Push algilandi. Dagitim baslatiliyor...');
exec('sh deploy.sh', (err, stdout) => {
if (err) console.error(err);
console.log(stdout);
});
res.writeHead(200);
return res.end('OK');
}
res.writeHead(404);
res.end();
}).listen(4000);Bunu necə tətbiq etmək olar?
Clodo Control Panel Quick Method
Your own webhook listenerThere is no built-in GitHub integration in the panel; you set up auto-deploy yourself with the webhook listener from this guide. What the panel provides is the runtime for that listener and a publicly reachable port.
Addım-addım icra:
- 1Pick Node.js or Python on the 'Runtime' tab; the listener runs there.
- 2Take the IP and port from the address card and enter it in the repository's Webhooks settings on GitHub.
- 3Bind the listener to SERVER_IP and SERVER_PORT; if it listens on 127.0.0.1, GitHub cannot reach it.
- 4Always verify the webhook secret, or anyone who learns the URL can trigger a deploy.
Bu bələdçi faydalı oldu?
Rəy birbaşa bu bələdçini yeniləyən komandaya gedir.
Əlaqəli bələdçilər
Developing 7/24 Discord.js v14 Bots and Managing with PM2
Step-by-step guide to building a Discord.js v14 bot, slash commands, and hosting it 24/7 using PM2 process manager.
Developing Async Python Discord Bots with discord.py and 24/7 Hosting
Build modern slash command bots using discord.py 2.0+, virtual environments, and continuous daemon supervision.

