Hosting my site on Gitlab
I moved my blog to Gitlab Pages. Gitlab is a place to host repositories, just like Github. The main advantage of Gitlab (for me) is that it’s possible to create private projects for free.
I also switched DNS-providers to Cloudflare, mainly because it was easier to enable SSL that way than to continue using Letsencrypt.
My steps to moving the site without downtime:
- set up new project on Gitlab
- upload your code and add a
.gitlab-ci.yml
(and Gemfile), here’s some examples - move DNS to Cloudflare (but still point to old server)
- setup the domain-name on Gitlab Pages (with
Force domains with SSL certificates to use HTTPS
turned off) - add the
TXT
verification-records on Cloudflare (Name
should start with_gitlab-pages
and contain the domain-name,Value
starts withgitlab
(no underscore) and has the verification code)- make sure you add two records! One
A-record
with the IP-address (formatth-ijs.nl
) and oneC-Name
record (forwww.matth-ijs.nl
), both in Cloudflare and in Gitlab! - Do not point DNS at your Gitlab yet!
- make sure you add two records! One
- wait until verification
- setup the SSL-certificates
- make sure you copy-paste the public PEM part as well!
- re-enable
Force domains with SSL certificates to use HTTPS
- in Cloudflare: point the DNS to Gitlab
- everything should work (although it could take a while before SSL is up)