Static Sites: Git Deployments
Deploy your static site automatically from a GitHub, GitLab, or Bitbucket repository. Every push to your configured branch triggers a new build and deployment.
Prerequisites
- A static site with Git Repository as the deployment method
- A Git repository hosted on GitHub, GitLab, or Bitbucket
Supported providers
| Provider | Repository URL format |
|---|---|
| GitHub | https://github.com/username/repo |
| GitLab | https://gitlab.com/username/repo |
| Bitbucket | https://bitbucket.org/username/repo |
Repository configuration
When creating or editing a static site with Git deployment, configure:
- Repository URL — The HTTPS URL of your repository
- Branch — The branch to deploy from (defaults to
main) - Publish directory — The folder containing your built files (e.g.,
dist,build,public, or/for root)
Private repositories
For private repositories, select an authentication method:
SSH key
- Select SSH Key as the authentication type
- Paste your deploy key (private key)
- Add the corresponding public key as a deploy key in your repository settings
Access token
- Select Access Token as the authentication type
- Enter a personal access token with read access to the repository
GitHub: Generate a fine-grained token with Contents: Read permission at Settings > Developer settings > Personal access tokens.
GitLab: Generate a project access token with read_repository scope at Settings > Access Tokens.
Bitbucket: Generate an app password with Repositories: Read permission at Personal settings > App passwords.
Setting up webhooks
Webhooks enable automatic deployments when you push to your repository.
Step 1: Get webhook details
- Navigate to your site detail page
- Find the Git Configuration section
- Copy the Webhook URL and Webhook Secret
Step 2: Add webhook to your provider
GitHub
- Go to your repository Settings > Webhooks
- Click Add webhook
- Payload URL — Paste the webhook URL
- Content type —
application/json - Secret — Paste the webhook secret
- Events — Select Just the push event
- Click Add webhook
GitLab
- Go to your project Settings > Webhooks
- URL — Paste the webhook URL
- Secret token — Paste the webhook secret
- Trigger — Check Push events
- Click Add webhook
Bitbucket
- Go to your repository Settings > Webhooks
- Click Add webhook
- Title —
DanubeData Deploy - URL — Paste the webhook URL
- Triggers — Select Repository push
- Click Save
Note: For Bitbucket, the webhook secret is verified via the
X-Hub-Signatureheader using HMAC-SHA256.
Webhook verification
Each provider uses a different signature mechanism:
| Provider | Header | Method |
|---|---|---|
| GitHub | X-Hub-Signature-256 | HMAC-SHA256 |
| GitLab | X-Gitlab-Token | Token comparison |
| Bitbucket | X-Hub-Signature | HMAC-SHA256 |
Auto-deploy
When auto-deploy is enabled, pushes to the configured branch automatically trigger new builds.
Enabling auto-deploy
- Navigate to the site detail page
- Click Edit
- Enable Auto-deploy on push
- Click Save
Branch filtering
Only pushes to the configured branch trigger builds. Pushes to other branches are ignored. To change the deploy branch:
- Navigate to the site detail page
- Click Edit
- Update the Branch field
- Click Save
Manual builds from Git
You can trigger a build manually without pushing to the repository:
- Navigate to the site detail page
- Click Redeploy
This clones the latest commit from the configured branch and starts a new build.
Build details
Each Git-triggered build records:
- Commit SHA — The exact commit that triggered the build
- Commit message — The commit message
- Commit author — Who made the commit
- Branch — The branch that was pushed to
- Trigger type —
webhookfor automatic builds,manualfor manual rebuilds
Troubleshooting
Webhook not triggering builds
- Verify the webhook URL and secret match the values shown in the dashboard
- Check that the webhook is configured for push events only
- Ensure Auto-deploy on push is enabled in the site settings
- Check the webhook delivery logs in your Git provider for HTTP response codes
- Ensure the push is to the configured branch (other branches are ignored)
Build fails with "clone failed"
- Verify the repository URL is correct and accessible
- For private repos, check that the SSH key or access token has read permissions
- Ensure the configured branch exists in the repository
Build succeeds but site shows old content
- Verify the Publish directory matches your build output folder
- Check that the built files include an
index.htmlat the root of the publish directory - If your build tool outputs to a different directory, update the publish directory setting
Webhook shows 401/403 errors
- Regenerate the webhook secret from the site settings
- Update the webhook configuration in your Git provider with the new secret
- Ensure the webhook URL has not been modified
Next steps
- Static Sites overview — Full feature reference
- Static Sites quick start — Deploy your first site
- Custom domains — DNS verification and TLS setup
Questions? Contact support at support@danubedata.ro