mirror of
https://codeberg.org/fediverse/fediparty.git
synced 2024-11-29 11:41:28 +00:00
Add Woodpecker config
This commit is contained in:
parent
4319e1349c
commit
a599b63d81
51
.woodpecker.yml
Normal file
51
.woodpecker.yml
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
# Example Woodpecker CI yaml file for a typical Hexo site
|
||||||
|
|
||||||
|
pipeline:
|
||||||
|
# Build step: it generates the files for the Hexo site
|
||||||
|
build:
|
||||||
|
image: node:lts-alpine
|
||||||
|
commands:
|
||||||
|
- npm install gulp -g
|
||||||
|
- npm install hexo-cli -g
|
||||||
|
- gulp build --cwd ./themes/starter
|
||||||
|
- hexo generate
|
||||||
|
- git checkout pages
|
||||||
|
- 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:
|
||||||
|
# Only run on these branches
|
||||||
|
include: [ main ]
|
||||||
|
# ...and never on pages branch (to ignore build triggered by CI commits)
|
||||||
|
exclude: pages
|
||||||
|
# Execute on every event except "pull_request"
|
||||||
|
event: [push, tag, deployment]
|
||||||
|
|
||||||
|
# Push step: it pushes the build output to "pages" branch
|
||||||
|
push:
|
||||||
|
image: appleboy/drone-git-push
|
||||||
|
settings:
|
||||||
|
branch: pages
|
||||||
|
remote: git@codeberg.org:fediverse/fediparty.git
|
||||||
|
# To work around "rejected...fetch first" error
|
||||||
|
force: true
|
||||||
|
commit: true
|
||||||
|
commit_message: "Woodpecker build ${CI_COMMIT_SHA:0:7}"
|
||||||
|
# Replace with your username for the commit
|
||||||
|
author_name: "Woodpecker CI"
|
||||||
|
# Replace with your email for the commit
|
||||||
|
author_email: "nonexistent@example.com"
|
||||||
|
ssh_key:
|
||||||
|
from_secret: ssh_key
|
||||||
|
when:
|
||||||
|
# Only try to commit if previous step is successful
|
||||||
|
status: success
|
||||||
|
branch:
|
||||||
|
# Only run on these branches
|
||||||
|
include: [ main ]
|
||||||
|
# ...and never on pages branch (to ignore build triggered by CI commits)
|
||||||
|
exclude: pages
|
||||||
|
# Execute on every event except "pull_request"
|
||||||
|
event: [push, tag, deployment]
|
Loading…
Reference in a new issue