Prerequisites
- A GitLab account (cloud or self-hosted) with a repository containing your static site
- A statichost.uk account (sign up free)
Step 1: Create a Site
- Log in to your statichost.uk dashboard
- Click New Site
- Enter your site name and GitLab repository URL
- For GitLab.com:
https://gitlab.com/username/repo.git - For self-hosted:
https://your-gitlab.example.com/username/repo.git
- For GitLab.com:
- Select your branch (usually
main) - Choose your framework (Hugo, Jekyll, or Static)
- Set the publish directory
Step 2: Add Deploy Key (Private Repos)
If your repository is private:
- In your site settings, copy the SSH deploy key
- Go to your GitLab project → Settings → Repository → Deploy keys
- Click Add key
- Paste the key and give it a title
- Leave “Write access” disabled
Step 3: Set Up Webhooks
GitLab webhooks enable automatic deployments:
- In your site settings, copy the Webhook URL and Webhook secret
- Go to your GitLab project → Settings → Webhooks
- Enter the webhook URL
- Paste the secret token
- Check Push events
- Uncheck SSL verification if using a self-signed certificate on your GitLab instance
- Click Add webhook
Self-Hosted GitLab
statichost.uk fully supports self-hosted GitLab instances. The setup is identical — just use your self-hosted GitLab URL when creating the site.
Requirements for self-hosted GitLab:
- Your GitLab instance must be accessible from the internet (we need to clone the repo and receive webhooks)
- SSH access on port 22 (for deploy key cloning)
- HTTPS webhook endpoint (for push notifications)
If your self-hosted GitLab uses a non-standard SSH port, include it in the repository URL configuration.
Step 4: Deploy
Push to your configured branch or click Deploy in your dashboard. Your GitLab webhook will trigger an automatic build and your site will be live within seconds.
Adding a Custom Domain
- Go to your site → Domains
- Click Add Domain and enter your domain name
- Add the DNS records shown with your domain registrar
- Click Verify — your TLS certificate is issued automatically
- Set as primary domain to redirect all traffic