Git Providers
You can use any git provider you want with statichost.eu. If git clone works,
it will work on statichost.eu. Specific instructions for setting up certain git
providers are given below. Please contact us if
you feel we should add a provider, or if you have questions or comments!
Forgejo (e.g. Codeberg)
Forgejo-based providers, such as Codeberg or CodeFloe.
Private repositories
- Navigate to the repository of your site.
- Go to the
Settingstab. - Click on the
Deploy keyssidebar entry. - Click on the
Add deploy keybutton. - Paste the provided key under
Contentand optionally choose a name for the deploy key. - Press
Add deploy key.
Build webhooks
- Navigate to the repository of your site.
- Go to the
Settingstab. - Click on the
Webhookssidebar entry. - Click on the
Add Webhookbutton. - Click on the
Forgejomenu item. - Enter
https://builder.statichost.eu/YOUR_SITE_NAMEin the Target URL field. - Select
POSTas the HTTP Method. - Select
application/jsonas the POST Content Type. - Select the
Trigger OnPush Events. - Optionally specify a branch filter.
- Click
Add Webhook.
SourceHut
Both sr.ht and self-hosted versions.
Private repositories
SourceHut does not have a repository-specific “deploy key” concept like many other providers. Instead, you need to add the deploy key to your user account. Note that if you have many private sites, the deploy keys of all sites need to be added separately (as the deploy keys are site-specific).
- Go to the
keyssettings of your user account. - Under
SSH Keys, paste the provided keySSH Public Keyand clickAdd key.
Build webhooks
SourceHut has no user interface for adding webhooks*, unfortunately. The easiest way to achieve automatic deploys is to add a simple build script that essentially works like a webhook. It will run when code is pushed to the repository and issue a POST request to the build webhook endpoint of your site.
Add the following build configuration to a file called .build.yml in your
repository:
image: alpine/latest
tasks:
- build: |
curl -fX POST https://builder.statichost.eu/YOUR_SITE_NAME --no-progress-meter
*) SourceHut does have webhooks, but they can only be managed via their API.
GitHub
Both GitHub-hosted and on-prem enterprise editions.
Private repositories
- Navigate to the repository of your site.
- Go to the
Settingstab. - Click
Deploy keysin the menu. - Click on the
Add deploy keybutton. - Choose a name, such as “statichost deployment” and paste in the provided key under
Key. - Press
Add key.
Build webhooks
- Navigate to the repository of your site.
- Go to the
Settingstab. - Click on the
Webhookstab. - Click on the
Add webhookbutton. - Enter
https://builder.statichost.eu/YOUR_SITE_NAMEin the payload URL field. - Select
application/jsonas the content type. - Select
Just the push event. - Press
Add webhook.
GitLab
Both managed cloud-based and self-managed GitLab.
Build webhooks
- Navigate to your project (repository).
- Got to the
Settingsmenu entry. - Click on the
Webhookssubmenu entry. - Click on the
Add new webhookbutton. - Enter
https://builder.statichost.eu/YOUR_SITE_NAMEin the URL field. - Select the trigger type
Push eventsand optionally specify the deployment branch. - Check
SSL verification. - Click
Add webhook.
Bitbucket
Both Bitbucket Cloud and Self-Hosted Bitbucket.
Private repositories
- Navigate to your repository on bitbucket.org.
- Go to
Repository settings. - Under
Security, selectAccess keys. - Click the
Add keybutton. - Enter a descriptive name (e.g., “statichost deployment”) under
Label. - Paste the provided key into the
Keyfield. - Press
Add key.
Build webhooks
- Navigate to your repository on bitbucket.org.
- Go to
Repository settings. - Select
Webhooksfrom the sidebar. - Click the
Add webhookbutton. - Enter a descriptive title (e.g., “statichost deployment”).
- Enter
https://builder.statichost.eu/YOUR_SITE_NAMEin theURLfield. - Leave
Repository Pushas the only trigger. - Click
Save.
Azure DevOps
Both Azure DevOps in the cloud and Azure DevOps Server on-prem.
Private repositories
Azure DevOps does not have a “deploy key” concept like many other providers. It is possible to add SSH keys to your user account, and deploy keys can be added here*. Please note, however, that these keys will have full read/write access to all repositories you have access to. Thus, the recommended way to connect to private Azure DevOps is via Personal Access Tokens. Tokens can be limited in scope and can have expiration times.
In order to use a Personal Access Token (PAT) for authentication, you need to select HTTPS as the connection scheme in statichost.eu and add HTTPS authentication details. The username is your Azure DevOps username and the password is the PAT.
In order to create a new Personal Access Token, you can use either one of these methods:
- Navigate to the root your repository. Click
Clone, selectHTTPS, and clickGenerate Git Credentials. - Navigate to
User Settings->Personal Access Tokens. Create a new access token with at least theCode: Readscope for the relevant organization.
*) Azure DevOps only supports RSA keys, while statichost.eu uses ed25519 keys by default. If you need to create an RSA key for your site, please contact support.
Build webhooks
- Navigate to your project.
- Go to
Project settings(at the bottom of the sidebar). - Select
Service hooksunderGeneral. - Create a new subscription (plus sign).
- Select the
Web Hooksservice. - Select the
Code pushedtrigger, and add a filter for the repository connected to your site. - Enter
https://builder.statichost.eu/YOUR_SITE_NAMEunderURL. - Click
Finish.