9 min read
How to Deploy from GitHub: 4 Paths Compared
Key takeaways
- You can deploy from GitHub via GitHub Actions to a VPS, Vercel Git integration, DigitalOcean App Platform, or Azure App Service, each taking roughly 10 to 60 minutes to set up.
- GitHub Actions to a VPS gives full control but requires you to build your own rollback system with timestamped release folders and a symlink script.
- Vercel and DigitalOcean App Platform deploy on every push with no YAML, but both require an internationally billing USD card at signup.
- Vercel's usage-based pricing can produce surprise bills after a traffic spike, while DigitalOcean charges flat per-instance tiers.
- If you pay with MTN or Airtel mobile money, payment method is a deployment filter that rules out most major platforms before deploy flow even matters.
You can deploy from GitHub four ways: a GitHub Actions workflow pushing to your own VPS, Vercel's Git integration, DigitalOcean App Platform, or Azure App Service. Each takes roughly 10 to 60 minutes to set up, and the right one depends on your app, your team size, and whether you can pay in USD at all.
This guide walks through all four with copy-paste config, then helps you choose.
What does 'deploy from GitHub' actually mean and which methods exist?
Deploying from GitHub means your code goes live automatically when you push to a branch, with no manual build or upload step. The server or platform pulls your repo, builds it, and runs it. If you have ever wanted plain git push to deploy without writing deployment scripts, this is the idea behind it.
There are four main methods. First, managed PaaS Git integration, where connecting your repo is the whole setup. Second, vendor app platforms like Render or Railway, which watch your repo and rebuild on every commit. Third, GitHub Actions to a VPS, where you write a workflow that SSHes into your own server on each push (workflow triggers and syntax are documented at GitHub Actions docs). Fourth, push-to-deploy PaaS, where a bare git push triggers the build, as shown in this walkthrough of deploying Node.js with git push.
The next sections cover each path step by step.
How do you automatically deploy from GitHub using GitHub Actions?
GitHub Actions is the generic automation layer behind most git push to deploy setups. You write a workflow file, commit it to .github/workflows/, and GitHub runs it on every push, pull request, or schedule you define. Unlike Vercel or Render, which hide the pipeline, Actions shows you every step, so you can deploy anywhere: a VPS, a container registry, or a managed platform.
The anatomy of a deploy workflow
A workflow has three moving parts. Triggers decide when it runs, usually on: push: branches: [main]. Runners are the virtual machines that execute your steps; you get free minutes on public repos and a monthly allowance on private ones. Secrets store tokens and SSH keys under your repo's Settings, so credentials never sit in your code.
A minimal deploy job checks out your code, runs your build, then copies the artifact to your server or pushes it to a registry. No Kubernetes, no YAML beyond the one workflow file. The tradeoff: you own the script, so failed deploys are yours to debug at 2am. If you'd rather skip writing workflows entirely, a PaaS that watches your repo, like Omeganodes, gives you push-to-deploy without the YAML.
How do you auto deploy from GitHub to your own server via SSH?
The VPS route means your workflow connects over SSH, pulls your latest commit, builds it, and restarts the app. Setup takes about 20 minutes the first time.
First, generate a key pair on your server (ssh-keygen -t ed25519) and add the public key to your repo's deploy keys in GitHub. Then store the private key as an encrypted secret: GitHub documents encrypted secrets under your repository's Settings, and you add the server host, user, and key as SSH_HOST, SSH_USER, and SSH_PRIVATE_KEY. Secrets are encrypted at rest and only exposed to workflows you explicitly allow.
Copy-paste workflow YAML for SSH deploy
Put this in .github/workflows/deploy.yml:
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd /var/www/myapp
git pull origin main
npm ci --production
pm2 restart myapp
That is the whole deploy pipeline. Every push to main SSHes in, pulls, installs, and restarts via pm2. Adjust the build line for your stack, whether that is pip install -r requirements.txt or a Docker build.
Rollbacks on a VPS: what you have to build yourself
This is where the VPS route demands work a managed PaaS gives you. There is no rollback button. You have to build it: keep releases in timestamped folders (/releases/20250611-1430/), symlink current to the newest one, and write a script that flips the symlink back one release when something breaks. Add a health check after restart, or you will only learn about a bad deploy from your users. This is the trade-off worth naming honestly: you own the whole machine, and that includes owning every failure mode. If you would rather not maintain release folders and rollback scripts, a push-to-deploy PaaS handles that for you; Omeganodes gives you git push deploys with automatic HTTPS on EU servers, payable with MTN or Airtel mobile money, and you can see how it works on the Omeganodes Italian site.
How do you deploy from GitHub to Vercel with Git integration?
Vercel connects to your GitHub account, and every git push triggers a build. No CI config, no YAML: you import the repo, Vercel detects the framework (Next.js, Vite, plain static), and deploys it.
Two things happen on each push. Merges to your main branch update production. Every pull request gets its own preview deployment at a unique URL, so you can test a side project change on your phone before merging.
The catch is pricing. Vercel bills on metered usage: bandwidth, function execution, and build minutes. A hobby project can sit at $0 for months, then a traffic spike or a runaway loop produces a bill you did not plan for. If you need a fixed cost you can pay with MTN or Airtel mobile money instead of a USD card, that model is a problem. That is the gap Omeganodes was built for: flat regional pricing, mobile money, and push-to-deploy without usage surprises.
How do you deploy from GitHub to DigitalOcean App Platform?
DigitalOcean App Platform connects to your GitHub repo and builds automatically on every push. You authorise the GitHub App, pick a repo and branch, and it detects your stack using buildpacks, so Node, Python and static sites need no Dockerfile. Set a health check path and environment variables, then hit deploy; later pushes to that branch redeploy on their own. This is the same git-push model Vercel popularised, and Vercel's Git integration docs describe the identical flow for their platform.
The pricing difference matters for side projects: App Platform charges per app instance rather than metering per request or per build minute, so a small static site can sit on a free tier while a backend app costs a flat monthly rate. The trade-off is that a database is a separate paid service, and payment still requires a card that bills in USD. If that card is the blocker, Omeganodes pricing covers mobile money instead.
How do you deploy from GitHub to Azure App Service?
Azure App Service connects to your repo through its Deployment Center. Open the Azure portal, create an App Service inside a resource group, pick your runtime stack, authorise GitHub, and Azure generates a GitHub Actions workflow in your repo. Every push to your chosen branch then builds and deploys automatically, and you can watch the run in the Actions tab.
The git push to deploy part works. The overhead sits around it: resource groups, app service plans, pricing tiers, and region selection all need decisions before your first deploy. For a team, that structure pays off. For a solo developer shipping a side project, it is a portal, a billing account with a card, and several screens between you and a running app.
If you want fewer steps, Render, Railway, or a regional PaaS gets you there faster.
Which GitHub deployment method should you choose for your project?
| Path | Setup effort | Build minutes | Rollback | Pricing model |
|---|---|---|---|---|
| GitHub Actions to a VPS | High: write the workflow yourself | Uses your Actions quota | Manual: redeploy old commit | VPS + minutes |
| Vercel Git integration | Low: connect repo | Included per plan | Automatic per deployment | Usage-based, can spike |
| DigitalOcean App Platform | Low: connect repo in dashboard | Included, auto-builds on push | Automatic per deployment | Fixed tiers |
| Azure App Service | Medium: portal + GitHub auth | Runs in Actions | Slot swap or redeploy | Fixed or usage tiers |
For a side project you maintain alone, Vercel or App Platform gets you live fastest. If you need a database outside the platform's approved list or want your own server, GitHub Actions to a VPS wins.
What about a managed PaaS that deploys on git push?
Omeganodes runs the same push-to-deploy model: connect your repo, get automatic HTTPS and a custom domain, no YAML. The honest gap: it serves EU regions only, so latency for East African users is higher than a VPS in Nairobi. The difference is payment: MTN and Airtel mobile money instead of a USD-billing card.
How do you pay for hosting when your card does not bill in USD?
Every path above assumes one thing: a card that bills internationally in USD. Heroku, Render, Vercel, Azure and DigitalOcean all require one at signup. If you pay with MTN Mobile Money or Airtel Money, that requirement alone rules them out, no matter how good the deploy flow is.
Payment method is a deployment feature. If you cannot complete billing, git push to deploy is irrelevant. So treat it as a filter in the decision framework from the previous section: app type, team size, payment method.
An honest look at Omeganodes against the same criteria
Omeganodes is built for exactly this case: push-to-deploy from GitHub to EU servers, automatic HTTPS and custom domains, no Kubernetes or YAML, and mobile money payments with regional pricing for East African developers. You connect a repo, push to your main branch, and the platform builds and releases without a workflow file, which puts it in the same category as Vercel and App Platform on deploy flow. Run through the same criteria, it falls short where the big platforms are strong: fewer integrations, smaller ecosystem, no free tier at Heroku's former scale, and a smaller region list than Fly.io or Railway. If you need SOC 2 support or scale past 100k users on one platform, the Hacker News commenters quoted earlier are right to be cautious. For a side project or first SaaS paid for in shillings, the trade is reasonable.
FAQ
Can I deploy from GitHub for free?
Partly. GitHub Actions gives free minutes on public repos and a monthly allowance on private ones, so a VPS deploy can cost only the server itself. DigitalOcean App Platform has a free tier for small static sites. Vercel sits at $0 for quiet hobby projects but bills on usage, so a traffic spike can produce a surprise invoice.
Do I need GitHub Actions to automatically deploy from GitHub, or will a webhook do?
No, Actions is not required. Vercel, DigitalOcean App Platform, and similar platforms use their own Git integrations and webhooks: you authorise access, pick a repo and branch, and every push triggers a build with no workflow file. Actions is the right tool when you deploy to your own server and need to script the SSH, build, and restart steps yourself.
How do I deploy from GitHub to a server without a payment card at all?
Most platforms, including Vercel, DigitalOcean, Azure, and Render, require an internationally billing card at signup, which rules them out if you pay with MTN or Airtel mobile money. Your options are a regional PaaS that accepts mobile money, or the free Actions quota pushing to a VPS you rent from a provider that takes local payment.
Is git push to deploy the same as CI/CD?
It overlaps but is not identical. Push-to-deploy covers the continuous delivery part: a push triggers build and release automatically. Full CI/CD also includes running tests, linting, and staged promotions before anything ships. GitHub Actions can do both, while platforms like Vercel or App Platform typically just build and deploy unless you add a separate test step.
How do I roll back a bad deploy that came from GitHub?
It depends on the platform. Vercel, DigitalOcean App Platform, and Azure offer one-click rollback to a previous deployment. On a VPS you must build it yourself: keep timestamped release folders, symlink the current one, and flip the symlink back a release when something breaks. Without that setup, your fallback is redeploying an older commit and waiting for the build.
Deploy at the speed of Africa
World-class hosting, open to every developer, wherever you build and however you pay. Start free in a couple of minutes — no credit card, no lock-in.