From 724723ecbd6c14fb8c2cd3d58eaf48f9675ee183 Mon Sep 17 00:00:00 2001 From: lostinlight Date: Wed, 19 Jan 2022 20:23:21 +0300 Subject: [PATCH] Add new CI config - testing --- .woodpecker.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .woodpecker.yml diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..acc8cbe --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,32 @@ +# Example Woodpecker CI yaml file for a typical Hexo site + +pipeline: + # Build step: it generates the files for the Hexo site + build: + image: node:12.22.1 + commands: + - npm install gulp -g + - npm install hexo-cli -g + - test -e package.json && npm install + # TODO: figure out why Gulp fails with: Local gulp not found in /woodpecker/src/codeberg.org/fediverse/fediparty/themes/starter + - 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 + branches: [main] + when: + event: [push] + + publish: + image: alpine + commands: + # configure git + - git checkout -b pages + - git config --global user.email "nonexistent@example.com" + - git config --global user.name "Codeberg CI" + # deploy changes + - git add -A + - git commit -m "Deploy website - based on commit ${CI_COMMIT_SHA}" + - git push origin pages