website/.woodpecker.yml

31 lines
No EOL
1.1 KiB
YAML

# Based on https://codeberg.org/Codeberg-CI/examples/src/branch/main/Jekyll/jekyll.yml
steps:
build:
# Use the official ruby build container
image: ruby:3.2.2
secrets: [ cbtoken, cbmail ]
commands:
# Set up git in a working way
- git config --global --add safe.directory /woodpecker/src/codeberg.org/daudix-UFO/blog-source/_site
- git config --global user.email "$CBMAIL"
- git config --global user.name "CI Builder"
- git config --global init.defaultBranch pages
# clone and move the target repo
- git clone -b pages https://codeberg.org/daudix-UFO/blog.git
- mv blog _site
- cd _site
# Prepare for push
- git remote set-url origin https://$CBTOKEN@codeberg.org/daudix-UFO/blog.git
- cd ..
# Run Jekyll build stage
- gem install bundler
- bundle install
- bundle exec jekyll build
# Only needed for custom domains
# - cp domains _site/.domains
# Push to target
- cd _site
- git add --all
- git commit -m "Woodpecker CI Jekyll Build at $( env TZ=Europe/Berlin date +"%Y-%m-%d %X %Z" )"
- git push