fediparty/.woodpecker.yml
2022-01-22 13:27:40 +03:00

34 lines
914 B
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
when:
branch:
include: [ main ]
event: [push, deployment]
publish:
image: alpine
secrets: [ access_token ]
commands:
- apk add git
# configure git
- git config --global user.email "nonexistent@example.com"
- git config --global user.name "Codeberg CI"
- git clone https://"$${ACCESS_TOKEN}"@codeberg.org/fediverse/fediparty.git pages
- cd pages
- git checkout -b pages
- mv ../public/* .
- mv ../.domains .
# deploy changes
- git add -A
- git commit -m "Woodpecker build ${CI_COMMIT_SHA}"
- git push --force origin pages