Build it yourself with GitHub Actions
If you want to build the site yourself — with your own Hugo version, npm, Tailwind, a tool other than Hugo or your own test suite — you can do it in your CI and send the finished result to us. We publish it exactly as it is.
Everything else works as usual: your own domain, HTTPS, domain verification, saved versions and an email if something goes wrong.
There are two ways. Upload is the simplest: your workflow sends the finished site straight to us. If you would rather have us fetch it from your repository, that works too, via a dedicated branch.
Option 1: Upload (recommended)
We don't need any access to your repository at all — no deploy key and no webhook.
1. Add the upload address as a secret
The upload address is shown under your service in the portal
(Services → GetGeek Static → Upload URL). Add the last part of the address —
the key after /upload/<site>/ — as a secret in your repository:
Settings → Secrets and variables → Actions → New repository secret, with the
name GETGEEK_UPLOAD_TOKEN.
Unlike the webhook address, this key can change the content of your site. Only store it as a secret in GitHub, never in a file in the repository. If you think it has leaked, press Ny webhook- och uppladdningsnyckel (new webhook and upload key) on the service page. The old key stops working when the change is done, normally within 1–2 minutes.
2. Add a workflow
Replace <sajt> with your site name (it is in the upload address in the
portal). You can change the build step freely — all we care about is the
archive: a tar.gz with the finished site and index.html at the top level.
The workflow only needs read access to the repository (contents: read),
since nothing is pushed back.
Good to know about uploading
- Response
202= received, the site is published within a few seconds.403= wrong key,413= the archive is larger than 1 GB,415= not atar.gzarchive. - If publishing fails — for example if
index.htmlis missing — you get an email, and your site keeps showing the latest working version. - Symbolic links are never published. An archive containing any is rejected.
- The same archive twice does not create a new version.
- It works the same from any CI system and from your own computer — it is an ordinary HTTP request.
Option 2: Via the gh-pages branch
Here your workflow pushes the result to a branch in your repository, and we fetch it with the deploy key. This suits you if you want the built site versioned in git.
1. Add a workflow (gh-pages)
Create the file .github/workflows/deploy.yml in your repository:
The workflow builds the site on every push to main and puts the finished
result in the gh-pages branch. Feel free to replace the build step with
whatever you like — all we care about is that gh-pages contains the finished
site, with index.html at the top level.
GITHUB_TOKEN used for?
Only inside GitHub, so that the workflow can push the built site to the
gh-pages branch in your own repository.
- It is not a secret you create yourself. GitHub automatically creates a token for each run, and it expires when the job is finished.
- It only applies to your repository, with the permissions the workflow asks
for. That is why the file says
permissions: contents: write— the step that pushes togh-pagesneeds write access. - It never leaves GitHub, and GetGeek never sees it. Our access to your
repository is only the deploy key, which is read-only. We fetch
gh-pagesafter GitHub has pushed to it.
If you don't want to give the workflow write access via GITHUB_TOKEN,
actions-gh-pages can use a deploy key of your own with write access instead
(deploy_key: instead of github_token:). The result is the same, but it is one
more key to keep track of.
2. Choose the mode Pre-built branch in the repo
Choose Pre-built branch in the repo in the order,
or switch later with the link Uppgradera/nedgradera (upgrade/downgrade) under Hur publicerar ni sajten? on the service page (free). Leave
Branch empty for gh-pages. The site is then set up so that we just
copy the branch.
3. Deploy key, webhook and DNS
Just as usual — see Connect GitHub and Getting started. The webhook should send on push.
Good to know about gh-pages
- GitHub sends the webhook for pushes to all branches. When you push to
mainwe hear about it straight away, but see thatgh-pageshasn't changed yet and do nothing. When your workflow then pushes togh-pages, we publish. Allow half a minute from push to published site. - Publishing is a plain copy. The
.nojekyllfile that the workflow puts in the branch comes along but makes no difference. - Don't set
cnameinactions-gh-pages— it applies to GitHub Pages, not to us. - If your build fails, you see it in GitHub (the Actions tab), not in an
email from us: the
gh-pagesbranch is then not changed, and your site keeps showing the latest version. - Other CI systems work the same way — GitLab CI, Gitea Actions and others — as long as the result is pushed to a dedicated branch in the repository.