Use plugin-codeberg-pages-deploy in mkdocs example (#35)

I've made a plugin to ease deployment of Codeberg Pages, and figured I would update one of examples to use it.

Tested that this works on https://ci.codeberg.org/repos/12946/pipeline/3.

Reviewed-on: https://codeberg.org/Codeberg-CI/examples/pulls/35
Reviewed-by: Patrick Schratz <pat-s@noreply.codeberg.org>
Co-authored-by: Kamila Borowska <kamila@borowska.pw>
Co-committed-by: Kamila Borowska <kamila@borowska.pw>
This commit is contained in:
Kamila Borowska 2023-12-30 09:49:10 +00:00 committed by Patrick Schratz
parent d85e697118
commit a0ae9079ab

View File

@ -4,24 +4,18 @@
steps:
build-docs:
# build the docs in /docs with mkdocs and
# add the .domains file for codeberg pages
# build the docs with mkdocs and add the .domains file for codeberg pages
image: squidfunk/mkdocs-material
commands:
- mkdocs build -f ./mkdocs.yml -d docs_build
- git switch --orphan pages
- mv docs_build/* .
- echo -e '<yourtld.com>\n<codeberg_username>.codeberg.page\npages.<codeberg_username>.codeberg.page' > .domains
- mkdocs build
- echo -e '<yourtld.com>\n<codeberg_username>.codeberg.page\npages.<codeberg_username>.codeberg.page' > site/.domains
deploy-docs:
# Push the resulting files to openfindata/pages
# to deploy
image: appleboy/drone-git-push
image: codeberg.org/xfix/plugin-codeberg-pages-deploy
settings:
folder: site
repository_name: <codeberg_org>/pages
branch: main
remote: git@codeberg.org:<codeberg_org>/pages.git
force: true
commit: true
ssh_key:
# created using woodpecker cli with:
# woodpecker secret add -repository <org>/<repo> \