fix Hugo migration article + remove draft
All checks were successful
Build Blog Docker Image / build docker (push) Successful in 1m17s

This commit is contained in:
d3vyce 2024-02-24 17:42:48 +01:00
parent 069595706b
commit a4e31c49c7

View File

@ -1,7 +1,6 @@
---
title: "Migrate from Ghost to Hugo"
date: 2024-02-17
draft: true
date: 2024-02-24
slug: "migrate-from-ghost-to-hugo"
tags: ["ci/cd", "docker", "git", "hugo"]
type: "programming"
@ -83,7 +82,7 @@ And that's all there is to it! You just need to make sure that LFS is also enabl
### CI/CD
Last step of the migration, I'm going to make an automatic deployment of my blog when I push a new article. To do this, I'll use CI/CD.
At first I used a CI that generated an image with the version of hugo I wanted, then generated my blog and finally added it to a nginx image. But after a few tests I realized that creating an image with hugo took up to 5min on my worker. So I'm going to create 2 workflows; one for creating the Hugo image and the second for building my blog. In fact, I only need a new hugo when I bump its version.
At first I used a CI that generated an image with the version of hugo I wanted, then generated my blog and finally added it to a nginx image. But after a few tests I realized that creating an image with hugo took up to 5min on my worker. So I'm going to create 2 workflows; one for creating the Hugo image and the second for building my blog. In fact, I only need a new hugo image when I bump its version.
#### Hugo docker image
Start with the Hugo image with its Dockerfile and associated workflow:
@ -131,7 +130,7 @@ jobs:
file: ./hugo.Dockerfile
platforms: linux/amd64
push: true
tags: git.d3vyce.fr/d3vyce/hugo:latest
tags: git.d3vyce.fr/${{ github.repository }}:latest
```
This workflow will only be triggered if I make a modification to the `hugo.Dockerfile` (for example, if I bump hugo's version).