Blog · Tutorial
How to deploy from GitHub.
To deploy from GitHub, connect your repository to a deployment platform through a GitHub App, choose a branch, and let webhooks trigger a new build on every push. This guide explains each piece and the options.
- A GitHub App grants scoped repo access
- Webhooks tell the platform when you push
- One branch = production; PRs = previews
- Verified webhook signatures stop fake deploys
How it works
How does deploying from GitHub work?
Access, event, build, release. On Runex, access comes from the Runex GitHub App.
-
You
Grant access
Install the platform's GitHub App.
-
GitHub
Send a webhook
On every push and pull request.
-
Platform
Build the commit
After verifying the webhook.
-
Platform
Release
Swap traffic once it's healthy.
Compare
GitHub App vs OAuth app vs GitHub Actions: which should you use?
A GitHub App is the most secure way to connect a platform. Actions is for running your own pipeline.
| RecommendedGitHub App | User tokenOAuth app | Your pipelineGitHub Actions | |
|---|---|---|---|
| Acts as | Its own identity | A specific user | A workflow in your repo |
| Repo access | Only repos you pick | Everything the user can see | The repo it runs in |
| Survives a user leaving | Yes | No | Yes |
| Runs your app | The platform does | The platform does | No, deploys elsewhere |
Practices
What are the best practices for GitHub deployments?
Five habits for safe push-to-deploy. Pair push-to-deploy with instant rollbacks so a bad release is one click from undone.
- Grant the App access to only the repositories you deploy
- Protect the production branch and require pull request reviews
- Use preview deployments to test every pull request
- Keep secrets in the platform's environment variables, not in the repo
- Make sure you can roll back to a previous deploy in one step
On Runex
How do you deploy from GitHub on Runex?
Install the App, pick a branch, push. The GitHub deployment guide walks through it step by step.
-
You
Install the Runex GitHub App
On the repos you'll deploy.
-
You
Pick repo and branch
Usually main.
-
Runex
Deploy on push
Webhooks verified.
-
Runex
Preview each PR
A URL per pull request.
FAQ
Frequently asked questions
Short answers to related searches.
What is a GitHub webhook?
An HTTP request GitHub sends to a URL you register whenever an event happens, such as a push or a new pull request.
Is a GitHub App better than a personal access token?
Yes, for deployments. A GitHub App has its own identity and only the repos you grant, and it keeps working when a team member leaves.
Can I deploy only one branch automatically?
Yes. Most platforms deploy one branch, often main, to production and create previews for pull requests.
Do I need GitHub Actions to deploy from GitHub?
No. A deployment platform with a GitHub App builds on push by itself. Actions is useful for tests you want to run first.
Next step
Put it into practice.
Deploy an app from GitHub on Runex and get a live HTTPS URL. Free to start.
