The error comes from the fact that you run the forgejo runner with an image that doesn't have Docker, you'd need docker-in-docker (dind) in that case. But to update the homepage, you need to run docker on the host where it is.
There's 2 common ways to achieve what you want.
-
on the website host, run an agent that checks out the git repo in intervals (or gets triggered by a forgejo webhook) and deploys it there. A common solution for that is Komodo, but there's others as well. You don't need the forgejo runner in this scenario, at least not for the deployment, everything is managed by Komodo.
-
in the forgejo runner, you run a script that sshs into the website host and runs docker there, checking out the remote repo and deploys it with docker. A common tool for this is Ansible, which has modules for a lot of cases so you don't need to cobble together an ugly bash script