pat-s 5ffed3d2fa Add link checker and prettier (#49)
Adapted from WP main repo.

Reviewed-on: https://codeberg.org/Codeberg-CI/examples/pulls/49
Co-authored-by: pat-s <patrick.schratz@gmail.com>
Co-committed-by: pat-s <patrick.schratz@gmail.com>
2024-04-10 07:16:10 +00:00

28 lines
973 B
YAML

# build and deploy mkdocs to codeberg pages
# This assumes your code lives in one repo, and you have a <owner>/pages
# repo which will be used to host the built pages.
steps:
build-docs:
when:
event: [push, pull_request]
# build the docs with mkdocs and add the .domains file for codeberg pages
image: squidfunk/mkdocs-material
commands:
- mkdocs build
- echo -e '<yourtld.com>\n<codeberg_username>.codeberg.page\npages.<codeberg_username>.codeberg.page' > site/.domains
deploy-docs:
when:
event: [push, pull_request]
image: codeberg.org/xfix/plugin-codeberg-pages-deploy:1
settings:
folder: site
repository_name: <codeberg_org>/pages
branch: main
ssh_key:
# created using woodpecker cli with:
# woodpecker secret add -repository <org>/<repo> \
# -name codeberg_push_from_ci_priv_key -value @<path_to_privkey_file>
from_secret: codeberg_push_from_ci_priv_key