Add .woodpecker.yml

This commit is contained in:
video-prize-ranch
2022-12-13 15:59:54 -05:00
parent 3a3889db8c
commit 5a87a93757
+35
View File
@@ -0,0 +1,35 @@
pipeline:
build:
image: squidfunk/mkdocs-material
commands:
- mkdocs build
- mkdir artifacts
- tar -C artifacts/site.tar.gz site/
release:
image: plugins/gitea-release
settings:
api_key:
from_secret: gitea_api_key
base_url: https://codeberg.org
files: artifacts/*
secrets: [gitea_api_key]
deploy:
image: alpine:latest
commands:
- apk add git openssh
- mkdir -p ~/.ssh
- echo "$SSH_KEY" | tr -d '\r' > ~/.ssh/id_ed25519
- chmod 600 ~/.ssh/id_ed25519
- eval "$(ssh-agent -s)"
- ssh-add ~/.ssh/id_ed25519
- ssh-keyscan -H 'codeberg.org' >> ~/.ssh/known_hosts
- git config --global user.email "23rnofonsaf@wfonpwef.q1rnog"
- git config --global user.name "Codeberg CI"
- git clone git@codeberg.org:librarian/pages.git
- cd pages
- rm -rf docs
- mv ../site docs
- git add .
- git commit -m "Update site"
- git push
secrets: [ssh_key]