-
In another discussion did I mention my intent to move away from GitHub Pages and over to Codeberg pages. With that come a few drawbacks I would need to deal with. My question now is... What's the recommended setup here? steps:
build:
image: squidfunk/mkdocs-material
commands:
- ... The issue with that is, that I also have other dependencies than just Material for MkDocs, so I would need a different solution here to work... I assume I could use the python image and just pip install everything like I do with GitHub Actions right now? Woodpecker-CI docs in case you're curious what it has... I have no idea what it all offers tbh... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I've gone with this setup here, which works for my personal needs. steps:
build:
image: python
secrets: [cbtoken]
commands:
- chmod -R a+w .
# Setup Git
- git config --global --add safe.directory /woodpecker/src/codeberg.org/Andre601/blog-source/website
- git config --global user.email "[email protected]"
- git config --global user.name "CI Website Builder"
- git config --global init.defaultBranch pages
# Clone and move Target Repository
- git clone -b pages https://codeberg.org/Andre601/pages.git
- mv pages website
- chmod -R a+w website
# Install Jekyll dependencies and build website
- pip install -r requirements.txt
- mkdocs build --site-dir website/blog
# Set remote repo for target
- cd website
- git remote set-url origin https://[email protected]/Andre601/pages.git
# Commit and push everything
- git add --all
- git commit -m "Update Blog ($( env TZ=Europe/Zurich date +"%d.%m.%Y" )) [SKIP CI]"
- git push |
Beta Was this translation helpful? Give feedback.
I've gone with this setup here, which works for my personal needs.
I use the
--site-dir
command override because the target repo hosts other stuff (Codeberg pages doesn't seem to support displaying repos with a pages branch as sub-pages of a custom domain (i.e.example.com/repo
))