A few days ago codeberg, my favorite Gitea instance, started experimenting with Static page hosting. I’ve started using it, but I kinda like using a static site generator. Here is a guide ~that I totaly didn’t steal from the hugo docs.~
Step one: make two git repos
make two git repositories. One called
pages, the other called whatever you want.
Pages will host the website, and the other repo will hold the uncompiled hugo filles.
Step two: Clone repos
Clone the secound repo, then make a submodule.
git clone https://codeberg.org/connor/hugo-site
git submodule add -b master https://codeberg.org/connor/pages public
Step three: make
Write this into a file called
# If a command fails then the deploy stops
printf "\033[0;32mDeploying updates to codeberg...\033[0m\n"
# Build the project.
hugo # if using a theme, replace with `hugo -t <YOURTHEME>`
# Go To Public folder
# Add changes to git.
git add .
# Commit changes.
msg="rebuilding site $(date)"
if [ -n "$*" ]; then
git commit -m "$msg"
# Push source and build repos.
git push origin master
Save it and make it executable
chmod +x deploy.sh
Step four: profit
When you are done, type
./deploy.sh and profit.