
Most developers already keep their code on GitHub. So the best deployment is the one that starts there: you push code, and your app updates. No zip files, no FTP, no copying files by hand.
PaaS platforms are built for this kind of workflow. You connect a repository once, and the platform pulls your code whenever you ask it to, or on a schedule.
Quick answer: To deploy from GitHub to PaaS, create an environment for your stack, add a project and connect your GitHub repository URL and branch, give the platform access if the repository is private, deploy, set your environment variables and run setup tasks. Then turn on auto-deploy so new commits are picked up, and keep all code changes in Git, not on the server.
New to PaaS? Start with our guide on what is PaaS, or read the general guide on how to deploy a web application on PaaS.
Why Deploy From GitHub?
Using Git as your deployment source gives you real advantages:
- Every release is traceable. You can see who changed what and when.
- Rollbacks are simple. You can go back to an earlier commit.
- Teams stay in sync. Everyone deploys the same code from the same place.
- Less manual work. No more uploading files by hand.
- Fewer mistakes. The code on the server matches what you tested.
Two Ways Git Deployment Can Work
It helps to know the difference between two common patterns:
| Pattern | How it works | Good for |
| Pull based | The platform pulls code from your repository when you click update, or on a schedule | Simple setups and small teams |
| Push based | A pipeline such as GitHub Actions builds, tests and then pushes the release | Larger teams and strict release rules |
On our platform, the built in Git deployment is pull based. You connect a repository and the platform can check it for new changes at a regular interval. If you want a full pipeline with tests and approvals, read our guide on CI/CD on PaaS.
Before You Start: Prepare Your Repository
A tidy repository saves hours later. Check these first:
- Your code runs locally. If it fails on your laptop, it will fail online.
- Secrets are not in the repository. Add .env files and key files to .gitignore.
- Dependencies are listed. Use composer.json, package.json or requirements.txt.
- Your branches are clear. For example, main for production and develop for staging.
- You have a README with setup notes. Your future self will thank you.
If you already committed a secret by mistake, change it right away. Removing it from the latest commit does not remove it from history.
Step 1: Create an Environment
In the dashboard, click New Environment and use the topology wizard. Choose the tab for your language, pick the application server and version, set resource limits, add a database if you need one and click Create.
Our knowledge base explains this in its guide to creating an environment. For stack specific guides, see how to deploy PHP applications on PaaS and how to deploy a Laravel application on PaaS.
Step 2: Add Your Project From Git
Once the environment is ready:
- Click the Add project button for the application server in your environment
- Choose Git as the version control system
- Paste your repository URL from GitHub
- Choose the branch you want to deploy
- Add credentials if the repository is private
- Decide whether to turn on auto-deploy
- Click Deploy
Our knowledge base shows the same flow in its guides to deploying a PHP project through Git or SVN and deploying a Node.js project through Git or SVN.
A note on Node.js: For Node.js, the knowledge base explains that one project can be deployed to an environment, and the path is ROOT by default. If you need more than one project, use more than one environment. We cover this in how to deploy multiple services in a PaaS environment.
Step 3: Handle Private Repositories
Public repositories are easy because the platform can read them without a login. For private repositories, the platform needs permission to read your code. Common ways to do this are a deploy key (a read only SSH key for one repository) or a personal access token.
Give the platform the least access it needs. A read only key for one repository is safer than a token that can reach your whole account. Ask our team or check the knowledge base for the method that fits your setup.
Step 4: Understand Auto-Deploy
When you add a project, there is an option called Check and auto-deploy updates. Here is how it works:
- When it is on, the platform checks your repository at regular intervals.
- It only redeploys if there are new code changes.
- When it is off, your settings are saved, and you update manually with the Update from GIT button.
This is a scheduled check, not an instant trigger on every push. So after you merge a change, expect a short delay before it goes live. If you need a deployment to happen at a precise moment, use the manual button.
Tip: Turn auto-deploy on for staging, where speed matters. For production, many teams prefer the manual button so a person decides when to release.
Step 5: Do Not Edit Code on the Server
This is the most common Git deployment mistake. If you change a file directly on the server and also change it in GitHub, the next update can cause a merge conflict. The platform’s own guide warns about this.
Make a simple rule: all code changes go through Git. If you must fix something urgently on the server, copy that same change into your repository straight afterwards.
Step 6: Set Variables and Run Setup Tasks
After the first deploy:
- Add your environment variables, such as database details and keys. Read our guide on how to configure environment variables in a PaaS application.
- Run setup tasks, such as installing packages and running database migrations
- Open the app in your browser and test the main pages
Step 7: Release Updates Safely
A simple release routine looks like this:
- Work on a feature branch
- Open a pull request and get it reviewed
- Merge into the branch your environment watches
- Wait for auto-deploy, or click Update from GIT
- Check the app and the logs
- If something breaks, revert the commit and update again
Using tags, such as v1.0 and v1.1, gives you clear points to go back to.
Step 8: Use Separate Environments for Staging and Production
Create two environments: one for staging, connected to a develop branch, and one for production, connected to main. Test every change on staging first. This costs a little more but prevents many bad releases. Our guide on how to evaluate a PaaS platform for production explains why this matters.
A Real-World Example
Imagine a two person team building a booking app. Before, they uploaded files by FTP and sometimes forgot to upload one, which caused strange bugs. They move to a Git workflow. They create a staging environment connected to the develop branch with auto-deploy on, and a production environment connected to main with manual updates.
On the first week, one developer edits a config file on the server to fix a quick problem. The next update fails with a merge conflict. They restore the file, make the same change in Git and update again. After that, they agree on one rule: nothing changes on the server unless it is in the repository. Releases become calm and traceable.
Common Problems and Fixes
| Problem | Likely cause | Fix |
| Deployment cannot reach the repository | Wrong URL or no access | Check the URL and credentials |
| Private repository fails | No key or token | Add a read only key or token |
| Update fails with a conflict | File edited on the server | Restore the file and use Git only |
| App deploys but shows errors | Missing variables or packages | Set variables and run install tasks |
| Changes do not appear | Auto-deploy has not run yet | Click Update from GIT |
| Wrong code is live | Wrong branch selected | Check the branch setting |
GitHub Deployment Checklist
| Step | Done |
| Repository clean, secrets excluded | Yes or no |
| Environment created | Yes or no |
| Project added with the right branch | Yes or no |
| Private access set safely | Yes or no |
| Auto-deploy chosen on purpose | Yes or no |
| Variables set and setup tasks run | Yes or no |
| Staging and production separated | Yes or no |
| Rollback plan ready | Yes or no |
Where to Go Next
Want tests and approvals before every release? Read CI/CD on PaaS. For databases, see how to deploy a database-backed application on PaaS. You can also check our application hosting page and see how our plans work on the PaaS pricing page.
Final Thoughts
Deploying from GitHub is the cleanest way to run an app on PaaS. Connect your repository, choose the right branch, decide how updates happen and keep every change in Git. Your releases become repeatable and your team stays in sync.
Ready to connect your repository? Explore our PaaS platform or speak to our team.
Frequently Asked Questions
Can I deploy from GitHub to a PaaS platform?
Yes. Most platforms let you connect a repository and deploy from it. On ours you add a project to your application server and connect your Git repository.
Does PaaS deploy instantly when I push to GitHub?
Not always. Our auto-deploy checks the repository at regular intervals, so there can be a short delay. You can also update manually.
Can I deploy a private repository?
Usually yes, with a read only key or token. Confirm the exact method with our team.
Which branch should I deploy?
Use main for production and a separate branch, such as develop, for staging.
What happens if I edit files on the server?
You may get merge conflicts on the next update. Keep all changes in Git.
How do I roll back a bad release?
Revert the commit or go back to an earlier tag, then update the environment again.


