2022-01-19 17:23:21 +00:00
|
|
|
|
|
|
|
pipeline:
|
2022-01-19 17:46:12 +00:00
|
|
|
# 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
|
2022-01-19 18:07:40 +00:00
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
include: [ main ]
|
|
|
|
event: [push, deployment]
|
2022-01-19 17:23:21 +00:00
|
|
|
|
2022-01-19 17:46:12 +00:00
|
|
|
publish:
|
|
|
|
image: alpine
|
|
|
|
commands:
|
2022-01-22 08:59:02 +00:00
|
|
|
- apk add git
|
2022-01-22 09:38:43 +00:00
|
|
|
- ls -l
|
2022-01-19 17:46:12 +00:00
|
|
|
# configure git
|
|
|
|
- git checkout -b pages
|
2022-01-22 09:38:43 +00:00
|
|
|
- ls -l
|
2022-01-19 17:46:12 +00:00
|
|
|
- git config --global user.email "nonexistent@example.com"
|
|
|
|
- git config --global user.name "Codeberg CI"
|
2022-01-22 09:38:43 +00:00
|
|
|
- git remote set-url origin git@codeberg.org:fediverse/fediparty.git
|
2022-01-19 17:46:12 +00:00
|
|
|
# deploy changes
|
|
|
|
- git add -A
|
|
|
|
- git commit -m "Woodpecker build ${CI_COMMIT_SHA}"
|
|
|
|
- git push --force origin pages
|