mirror of
https://codeberg.org/fediverse/fediparty.git
synced 2024-11-22 16:41:29 +00:00
Update Woodpecker config
This commit is contained in:
parent
d2d55dcedb
commit
05b7f8a00a
|
@ -1,32 +1,31 @@
|
||||||
# Example Woodpecker CI yaml file for a typical Hexo site
|
|
||||||
|
|
||||||
pipeline:
|
pipeline:
|
||||||
# Build step: it generates the files for the Hexo site
|
# Build step: generates the files for Hexo site
|
||||||
build:
|
build:
|
||||||
image: node:12.22.1
|
image: node:12.22.1
|
||||||
commands:
|
commands:
|
||||||
- npm install gulp -g
|
- npm install gulp -g
|
||||||
- npm install hexo-cli -g
|
- npm install hexo-cli -g
|
||||||
- test -e package.json && npm install
|
- 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
|
# 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
|
- gulp build --cwd ./themes/starter
|
||||||
- hexo generate
|
- hexo generate
|
||||||
- find -maxdepth 1 ! -name .git ! -name .domains ! -name public ! -name . -exec rm -rf {} \;
|
- 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
|
# This only copies non-hidden files; those whose names start with period WOULD NOT be copied
|
||||||
- mv public/* .
|
- mv public/* .
|
||||||
- rm -rf public
|
- rm -rf public
|
||||||
branches: [main]
|
branches: [main]
|
||||||
when:
|
when:
|
||||||
event: [push]
|
event: [push]
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
image: alpine
|
image: alpine
|
||||||
commands:
|
commands:
|
||||||
# configure git
|
# configure git
|
||||||
- git checkout -b pages
|
- git checkout -b pages
|
||||||
- git config --global user.email "nonexistent@example.com"
|
- git config --global user.email "nonexistent@example.com"
|
||||||
- git config --global user.name "Codeberg CI"
|
- git config --global user.name "Codeberg CI"
|
||||||
# deploy changes
|
# deploy changes
|
||||||
- git add -A
|
- git add -A
|
||||||
- git commit -m "Deploy website - based on commit ${CI_COMMIT_SHA}"
|
- git commit -m "Woodpecker build ${CI_COMMIT_SHA}"
|
||||||
- git push origin pages
|
- git push --force origin pages
|
||||||
|
|
Loading…
Reference in a new issue