Late to the party,1 I finally got around to experimentally moving a GitHub Pages-hosted static site to Codeberg. I wanted a low-risk site to try first, so I moved Beige Buttons, the site hosting my “90s PC turbo button simulator” web component.
Mostly for my own benefit later, here’s the steps I took and the things I learned along the way:
- You can migrate a repository across in about two clicks. Easy!
- Codeberg Pages is deployed from the
pagesbranch. If there’s no build step to the static site, all you need to do is rename themainbranch topages(and probably make it the default branch).2 - The default URL is
https://username.codeberg.page/repository. - You can use a custom domain by adding a
.domainsfile that lists domains; if migrating from GitHub Pages you can just rename yourCNAMEfile to.domains. - You’ll need to tweak your DNS
CNAME,ALIAS(or, worst-case,A/AAAA) record to point at Codeberg Pages.3
Change propogation feels slightly slower than GitHub, but perfectly tolerable.
The one thing that’s causing me trouble is that Codeberg Pages’ CORS headers prevent people from hotlinking the Beige Buttons JS, so there are some projects for which this wouldn’t be a suitable migration (issues are raised). But for most static sites, it’d probably Just Work and seems to be a great alternative.
Footnotes
1 With thanks to Kev for reminding me I’d had this on my list.
2 There are other ways to deploy but they don’t support custom domains yet.
3 Like GitHub Pages, Codeberg Pages uses LetsEncrypt for certificate provision, so you don’t need to change any CAA records.