adnan360 6eb00b8340 Fix to avoid already committed submodule dir 4 years ago
..
.drone.yml 6eb00b8340 Fix to avoid already committed submodule dir 4 years ago
README.md a66dbd541e Add Hugo Drone CI yaml config 4 years ago

README.md

Drone CI config for building Hugo sites with Codeberg.org

Create your Hugo site on a directory, such as src.

hugo new site src
cd src
# add a theme
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
echo 'theme = "ananke"' >> config.toml
# add a post (optional)
hugo new posts/my-first-post.md
sed -i 's/draft: true/draft: false/' content/posts/my-first-post.md
# set publishdir to repo root
echo 'publishdir = "../"' >> config.toml

Put the .drone.yml from this directory to the repo root directory on your pages repo. Change:

  • remote - paste in your repo's ssh url
  • branch - the branch you want to push the results (usually main or master)
  • author_name - commit author (appears on commit info nothing else)
  • author_email - commit author email (appears on commit info nothing else)

Check ../codeberg-push/README.md for details on how to setup ssh keys and stuff.

Demo

https://hugo-test.codeberg.page/ - source repo