ci: docs: try using the woodpecker plugin for mkdocs

This commit is contained in:
Wez Furlong
2024-02-09 13:21:44 -07:00
parent e93002c22d
commit 82c9541fcd
2 changed files with 24 additions and 21 deletions
+19 -15
View File
@@ -44,21 +44,7 @@ steps:
rebuild: "false"
restore: "true"
verify-docs:
when:
- evaluate: 'CI_PIPELINE_EVENT == "pull_request"'
image: docker-registry.wezfurlong.org/kumocorp/builder-for-ubuntu:22.04
pull: true
environment:
CARGO_HOME: .ci-cargo
CARGO_TERM_COLOR: always
commands:
- PATH=$PATH:$HOME/.cargo/bin
- CI=false CARDS=false CHECK_ONLY=1 ./docs/build.sh
build-docs:
when:
- evaluate: 'CI_PIPELINE_EVENT == "push" && CI_COMMIT_BRANCH == "main"'
image: docker-registry.wezfurlong.org/kumocorp/builder-for-ubuntu:22.04
pull: true
environment:
@@ -69,7 +55,25 @@ steps:
target: TOKEN
commands:
- PATH=$PATH:$HOME/.cargo/bin
- CI=true CARDS=true ./docs/build.sh
- CI=true ./docs/build.sh
run-mkdocs:
image: woodpeckerci/plugin-mkdocs:latest
pull: true
environment:
CARDS: true
settings:
config: mkdocs.yml
pip_install: "mkdocs-macros-plugin,mkdocs-include-markdown-plugin,mkdocs-exclude,mkdocs-git-revision-date-localized-plugin"
push-docs:
when:
- evaluate: 'CI_PIPELINE_EVENT == "push" && CI_COMMIT_BRANCH == "main"'
image: docker-registry.wezfurlong.org/kumocorp/builder-for-ubuntu:22.04
secrets:
- source: gh_pages_deploy_token
target: TOKEN
commands:
- ./assets/ci/push-gh-pages.sh
save-doc-cache:
+5 -6
View File
@@ -51,15 +51,14 @@ if hash black 2>/dev/null ; then
black docs/generate-toc.py
fi
DOCKER=docker
if hash podman 2>/dev/null ; then
DOCKER=podman
if [ "$CI" == true ] ; then
exit 0
fi
$DOCKER build -t kumomta/mkdocs-material -f docs/Dockerfile .
docker build -t kumomta/mkdocs-material -f docs/Dockerfile .
if [ "$SERVE" == "yes" ] ; then
$DOCKER run --rm -it --network=host -v ${PWD}:/docs kumomta/mkdocs-material serve
docker run --rm -it --network=host -v ${PWD}:/docs kumomta/mkdocs-material serve
else
$DOCKER run --rm -e CARDS=${CARDS} -v ${PWD}:/docs kumomta/mkdocs-material build
docker run --rm -e CARDS=${CARDS} -v ${PWD}:/docs kumomta/mkdocs-material build
fi