ci-demo-2/.woodpecker/.documentation.yml

49 lines
1.5 KiB
YAML

---
when:
path: "documentation/**"
variables:
- &frontend_image "cl00e9ment/node.js-builder:git"
clone:
git:
image: woodpeckerci/plugin-git
partial: false
settings:
skip_verify: true
steps:
"build:ui-bundle":
image: *frontend_image
commands:
- npm install
- npx gulp build
- npx gulp bundle:pack
directory: documentation/layouts/oc
"build:documentation":
image: *frontend_image
commands:
- unset HTTP_RPOXY # woodpecker sets empty proxy variables, but if present, antora expects valid values, empty is not valid
- unset http_proxy
- unset HTTPS_PROXY
- unset https_proxy
- pnpm install --frozen-lockfile
- pnpm antora generate --stacktrace antora-playbook.yml
directory: documentation
"assemble:documentation":
image: gcr.io/kaniko-project/executor:v1.18.0-debug
commands: # Test if using --insecure can be used to directly push to the registry
- echo "$CI_WORKSPACE"
- echo "$PWD"
- ls -lh
- /kaniko/executor
--context .
--dockerfile Dockerfile
--destination=image
--tar-path=image.tar
--no-push
- ls -lh
directory: documentation
"publish:documentation":
image: alpine/crane # because the official crane image is not compatible with woodpecker (no /bin/sh)
commands:
- crane push --insecure image.tar "container.192.168.1.151.nip.io:8543/${CI_REPO_OWNER}/${CI_REPO_NAME}"
directory: documentation