mirror of
https://codeberg.org/Codeberg-CI/examples.git
synced 2025-09-10 12:24:54 -04:00
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:
parent
d85e697118
commit
a0ae9079ab
@ -4,24 +4,18 @@
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
build-docs:
|
build-docs:
|
||||||
# build the docs in /docs with mkdocs and
|
# build the docs with mkdocs and add the .domains file for codeberg pages
|
||||||
# add the .domains file for codeberg pages
|
|
||||||
image: squidfunk/mkdocs-material
|
image: squidfunk/mkdocs-material
|
||||||
commands:
|
commands:
|
||||||
- mkdocs build -f ./mkdocs.yml -d docs_build
|
- mkdocs build
|
||||||
- git switch --orphan pages
|
- echo -e '<yourtld.com>\n<codeberg_username>.codeberg.page\npages.<codeberg_username>.codeberg.page' > site/.domains
|
||||||
- mv docs_build/* .
|
|
||||||
- echo -e '<yourtld.com>\n<codeberg_username>.codeberg.page\npages.<codeberg_username>.codeberg.page' > .domains
|
|
||||||
|
|
||||||
deploy-docs:
|
deploy-docs:
|
||||||
# Push the resulting files to openfindata/pages
|
image: codeberg.org/xfix/plugin-codeberg-pages-deploy
|
||||||
# to deploy
|
|
||||||
image: appleboy/drone-git-push
|
|
||||||
settings:
|
settings:
|
||||||
|
folder: site
|
||||||
|
repository_name: <codeberg_org>/pages
|
||||||
branch: main
|
branch: main
|
||||||
remote: git@codeberg.org:<codeberg_org>/pages.git
|
|
||||||
force: true
|
|
||||||
commit: true
|
|
||||||
ssh_key:
|
ssh_key:
|
||||||
# created using woodpecker cli with:
|
# created using woodpecker cli with:
|
||||||
# woodpecker secret add -repository <org>/<repo> \
|
# woodpecker secret add -repository <org>/<repo> \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user