The official documentation can be found on https://codeberg.page, but I think it is confusing and incomplete if one wants multiple pages with custom domain name.
Warning edit: for now I cannot recommend using Codeberg Pages if one requires reliable uptimes. Codeberg Pages might even become deprecated soon due to unresolved server problems regarding the pages.
The official documentation instructs to create a repository named "pages" for the static website, but what if one has multiple websites? It's also plain annoying to have such a name for a repository. Anyway, the following steps allows one to have multiple static pages on Codeberg without having to name them "pages", ugh.
This will preserve the nice graph that shows all the contributions made, and all the file versioning history of course.
git remote rename origin old-origin-github
git remote add origin https://codeberg.org/CynicusRex/quitfacebook.git
git branch -M pages
git push --set-upstream origin --all
git push --set-upstream origin --tags
git init
git branch -m pages
git add .
git commit -m "first commit"
git remote add origin https://codeberg.org/CynicusRex/quitfacebook.git
git push -u origin pages
Assuming one has a custom domain name, do the following. If one doesn't, then the official documentation probably suffices.
quitfacebook.org
www.quitfacebook.org
pages.quitfacebook.cynicusrex.codeberg.page
Type: A Record, Host: @, Value: 217.197.91.145, TTL: Automatic
Type: AAAA Record, Host: @, Value: 2001:67c:1401:20f0::1, TTL: Automatic
Type: CNAME Record, Host: www, Value: quitfacebook.cynicusrex.codeberg.page., TTL: Automatic
Type: TXT Record, Host: @, Value: quitfacebook.cynicusrex.codeberg.page., TTL: Automatic
All is done. It might take a couple of hours until the domain configurations get updated. Also, don't forget to unpublish your page on GitHub unless you've changed your domain name as well—read on in the latter case.
– – – – –
* Credits to Jan Wildeboer.
When changing domain names of a website formerly hosted on GitHub, then merely redirecting on one's registrar website will not redirect https URLs because GitHub pages does not support a .htaccess file nor the SSL plugin. Instead leave unchanged the settings on one's registrar and GitHub, and add a meta refresh tag on every page one wants redirected*.
<meta http-equiv="refresh" content="0;URL=https://www.arscyni.cc">
<meta http-equiv="refresh" content="0;URL=https://www.arscyni.cc/file/take_my_money.html">
All done. Enjoy.
– – – – –
* Credits to div72.
Ψ
Search for https://fosstodon.org/@stardust/110202336827539450 (fosstodon invite) on one's preferred Mastodon server while logged in, comments appear below.