fediparty/.woodpecker.yml

36 lines
1.0 KiB
YAML

pipeline:
# Build step: generates the files for Hexo site
build:
image: node:12.22.1
commands:
- npm install gulp -g
- npm install hexo-cli -g
- test -e package.json && npm install
- gulp build --cwd ./themes/starter
- hexo generate
- find -maxdepth 1 ! -name .git ! -name .domains ! -name public ! -name . -exec rm -rf {} \;
# This only copies non-hidden files; those whose names start with period WOULD NOT be copied
- mv public/* .
- rm -rf public
when:
branch:
include: [ main ]
event: [push, deployment]
publish:
image: alpine
commands:
- apk add git
- ls -l
# configure git
- git checkout -b pages
- ls -l
- git config --global user.email "nonexistent@example.com"
- git config --global user.name "Codeberg CI"
- git remote set-url origin git@codeberg.org:fediverse/fediparty.git
# deploy changes
- git add -A
- git commit -m "Woodpecker build ${CI_COMMIT_SHA}"
- git push --force origin pages