Hosting & sites
Git deploy: push to deploy your site
Connect GitHub or GitLab to auto-deploy your site on every push.
Setting up Git deploy
Git deploy lets you push to your repository and have your site update automatically.
Step 1: Connect your repository
- Go to Sites → your site → Git deploy
- Click Connect repository
- Authenticate with GitHub or GitLab
- Select the repository and branch to deploy from
Step 2: Configure the build
If your site needs a build step:
| Framework | Build command | Output directory |
|---|---|---|
| Next.js | npm run build | .next |
| React (CRA) | npm run build | build |
| Vue CLI | npm run build | dist |
| Nuxt | npm run build | .output |
| Static | (none) | / or dist |
For static HTML/CSS/JS sites, no build command is needed.
Step 3: Deploy
Push to your configured branch. KPanel detects the push, runs the build (if configured), and deploys. You'll see the deployment log in Sites → your site → Deployments.
Environment variables
Go to Sites → your site → Environment variables to set secret values (API keys, etc.) that are injected at build time or runtime.
Deployment hooks
You can trigger a deploy manually or via webhook. Go to Sites → your site → Git deploy → Webhook URL and copy the URL. POST to it from CI/CD (GitHub Actions, etc.) to trigger a deploy.
Rollback
To roll back to a previous deployment:
- Go to Sites → your site → Deployments
- Click a previous successful deployment
- Click Redeploy. Your site reverts to that state immediately