Deploy your Hugo site through SSH with GitHub Actions

Static site generation leverages website content management through version-control systems. With the help of CI (continuous integration) tools, we can set up automatic deployment via SSH. This article shows how to do such deployment using Hugo and GitHub Actions.
Deploy your Hugo site through SSH with GitHub Actions

Information

This article is an update of Deploy your Hugo site through SSH with Travis. I don’t use Travis CI anymore since they left open source maintainers out in the dust with their new pricing plan in 2020.

After having moved my blog from WordPress to Hugo, my next objective was to have it built and deployed automatically to my self-hosted webhosting server whenever I push a commit to GitHub. The main reasons to use this process are these:

  • I want that any change or addition to the website are as easy to deploy as a simple git commit;
  • I want my builds to be reproducible;
  • I want a clean state for each build;
  • I don’t want to be dependent on an external hosting service (no lock-in);
  • I don’t want to have to worry about a computer crash or about my own Internet connection.

I use this process for more about 4 years to deploy the MoodleBox documentation website (more than 1000 web pages!), and for a few days for deploying this blog (more than 900 pages!). It works great 👍

Continuer la lecture de « Deploy your Hugo site through SSH with GitHub Actions »

Deploy your Hugo site through SSH with Travis

Static site generation leverages website content management through version-control systems. With the help of CI tools, we can set up automatic deployment via SSH. This article shows how to do such deployment using Hugo and Travis CI.
Deploy your Hugo site through SSH with Travis

After having moved my blog from WordPress to Hugo, my next objective was to have it built and deployed automatically to my own webhosting server whenever I push a commit to GitHub. The main reasons to use this process are these:

  • I want that any change or addition to the website are as easy to deploy as a simple git commit;
  • I want my builds to be reproducible;
  • I want a clean state for each build;
  • I don’t want to be dependent on an external hosting service (no lock-in);
  • I don’t want to have to worry about a computer crash or about my own Internet connection.

I use this process for about a year to deploy the MoodleBox documentation website (about 200 pages), and for a few days for deploying this blog (more than 600 pages!). It works great 👍

Continuer la lecture de « Deploy your Hugo site through SSH with Travis »

Nouveau moteur pour ce blog : Hugo

Ce blog fonctionne désormais grâce à un générateur de sites statiques, Hugo, qui a remplacé avantageusement WordPress. Un changement pour plus de rapidité, de sécurité et des économies.
Nouveau moteur pour ce blog : Hugo

J’ai terminé il y a quelques jours la migration de ce blog vers Hugo, un générateur de sites statiques.

En 2006, lorsque j’ai commencé ce blog, le choix de WordPress était logique, et les arguments sont encore valides : écrit en PHP, il fonctionne donc presque chez n’importe quel hébergeur ; il est libre et gratuit ; comme il est très répandu —  WordPress est le moteur de plus de 33% de tous les sites web du monde — on a à disposition de nombreuses extensions et, en cas de problème, on a accès à une communauté d’utilisateurs active et de qualité.

Alors pourquoi changer ?

Il y a de nombreuses raisons pour passer à un générateur de sites statiques, mais les principales sont la rapidité, une sécurité accrue et l’économie faite sur l’hébergement, vu les faibles besoins en infrastructure matérielle côté serveur et que PHP n’est plus nécessaire.

Continuer la lecture de « Nouveau moteur pour ce blog : Hugo »