Moving This Site From Github To codeberg.org/statichost.eu
==========================================================
This is a quick writeup of the steps that I performed while moving
this site to Europe.
Move Repositories To ``codeberg.org``
-------------------------------------
.. topic:: Links
* `codeberg.org `__
This was easy, though much manual work. `Codeberg `__ is
a `Forgejo `__ instance, and that looks much
like Github repo management. In Github I got confused from time to
time, while in Codeberg so far I haven't (though I cannot say
exactly).
* Create Codeberg account (thereby deploying the SSH public key, btw.)
* Move repositories to Codeberg
* Main repository
* All the submodules that are used by that
* Adjust the main repo's submodule URLs accordingly
* Remove unused repos from Github
Serving Homepage From ``statichost.eu``
---------------------------------------
.. topic:: Links
* `statichost.eu Documentation, excellent!
`__
* :doc:`This site's build instructions `
* :doc:`Serving this site from Github Pages
`
* :doc:`Using a custom domain for Github Pages
`
I build this site using the `Sphinx documentation generator
`__. The build is performed
locally, into a "deployment" Git repository. That repository is then
pushed and automatically picked up by Github Pages via a webhook.
The excellent `Statichost documentation
`__ describes how to setup build
pipelines for various static site generators. I don't want that
(Sphinx is not among these generators anyway), so I take a shortcut
that resembles the Github Pages deployment way:
* On Codeberg, create a "deployment repo" (`mine is here
`__) which will
serve as Sphinx's output directory
* On `statichost.eu `__, create a new
site, specifiying the `deployment repo
`__. My site is
named ``jfasch-home``; it will be served as
``https://jfasch-home.statichost.page``
* In the `deployment repo
`__, create a
toplevel file ``statichost.yml`` with only one single line. Don't
specify an ``image:`` nor a ``command:`` as suggested - this will
simply serve the ``html/`` subdirectory of the `deployment repo
`__ as the site
content.
.. code-block:: yaml
:caption: ``statichost.yml``
public: html
* On Codeberg, setup a webhook for the `deployment repo
`__ as described
in the `Statichost documentation
`
* Use Sphinx to massage the `source repo
`__ right into the
`deployment repo
`__
* Push the deployment repo
* Watch the Codeberg webhook communicate with Statichost, who then
pulls and instantly serves the new content
Custom Domain
-------------
.. topic:: Links
* `Statichost "Custom domains" documentation
`__
Redirect both ``www.faschingbauer.me`` and ``faschingbauer.me`` to
``jfasch-home.statichost.page``. The `Statichost documentation
`__ describes what they need,
everything else is left to the interface of your DNS provider.