doc/.woodpecker.yml

37 lines
905 B
YAML
Raw Normal View History

2023-02-12 22:01:30 +01:00
pipeline:
build:
image: gitnet.fr/deblan/mkdocs
pull: true
2023-02-13 17:56:51 +01:00
environment:
2023-02-13 17:53:04 +01:00
- SITE_URL=https://tinternet.gitnet.page/doc/
2023-02-13 18:01:20 +01:00
commands: |
2023-02-13 18:08:03 +01:00
if [ -n "$SITE_URL" ]; then
2023-02-13 18:18:23 +01:00
sed -i "s,# site_url: \"{site_url}\",site_url: \"$SITE_URL\"," mkdocs.yml
2023-02-13 18:07:38 +01:00
fi
2023-02-13 18:01:20 +01:00
mkdocs build
git checkout mkdocs.yml
2023-02-12 22:01:30 +01:00
update:
image: alpine/git
commands:
- git fetch --no-tags origin +refs/heads/pages
- git switch pages
- git config --global user.email ci@gitnet.fr
- git config --global user.name CI
- mv site /tmp/
- rm * -fr
- mv /tmp/site/* .
- git add .
- git commit -m "Build ${CI_BUILD_NUMBER}"
deploy:
image: appleboy/drone-git-push
commands:
settings:
branch: pages
remote: git@gitnet.fr:tinternet/doc.git
force: false
commit: false
ssh_key:
from_secret: ssh_priv_key