I’ve got some time to get back to CI/CD project. At this state I need a way to trigger the update the blog sources from git. For this I create a small shell script that will update the git repo. It listen on port 7777 and triggers a pull.

#!/usr/bin/env bash

echo "[run-updater]: Starting"
test -f /tmp/ && kill $(cat /tmp/ && rm /tmp/ && echo "[run-updater]: Restart updater"
echo $$ > /tmp/
while true; 
        echo -e "HTTP/1.1 204 No Content\r\nConnection: close\r\n\r" |   nc -l 7777; bash

Next is to run the hugo server

#!/usr/bin/env bash

test -f /tmp/ && kill $(cat /tmp/
#TMP_DIR=$(mktemp -d)

cd /tmp/
test -d Blog || git clone --recursive ssh://

cd Blog
git pull
hugo server -D -b $IP --bind $IP & 
pgrep hugo > /tmp/
cd tools
bash &

Now I can git commit from my phone and trigger it via curl 7777 (this is just a example). Next is to create a docker container in which the process is executed. For this I pull an archlinux image and install hugo. Now I need to sync the git sources into the docker container. But I do this tomorrow.

So far,