53 lines
2.3 KiB
YAML
53 lines
2.3 KiB
YAML
# Woodpecker CI pipeline for co-op/docs — THIN on purpose.
|
|
#
|
|
# It does NOT re-implement the build. The repository's publishing layer is the
|
|
# single source of truth and this pipeline only wires it up:
|
|
#
|
|
# publishing/requirements.txt pinned MkDocs + Material toolchain
|
|
# publishing/build.sh stage Markdown -> .site-src/, render .site-build/
|
|
# publishing/deploy.sh push .site-build/ into the Cloudron Surfer app
|
|
#
|
|
# Any change to how the site is built belongs in publishing/, never here.
|
|
#
|
|
# Run model: MANUAL ONLY for now. The Gitea webhook that fires this on push is
|
|
# deliberately NOT wired — the poll watcher (docs-deploy-poll.service on the
|
|
# agent host) remains the live auto-deploy path until a manual run has proven
|
|
# the pipeline. Once it has, add `push` to the `when` block below and register
|
|
# the webhook in Gitea.
|
|
#
|
|
# Backend note (IMPORTANT — this is why there are no container images here):
|
|
# The co-op's Woodpecker agent runs as a Cloudron app, which has no Docker
|
|
# socket, so it uses Woodpecker's `local` backend. Under `local` each step is
|
|
# run as a shell command INSIDE the agent container, and the step's `image:`
|
|
# field selects the SHELL, not a container image. Every tool the steps need is
|
|
# therefore baked into the agent image (co-op/woodpecker-agent):
|
|
# python3 + the pinned MkDocs toolchain (venv at /opt/docs-venv, mirroring
|
|
# publishing/requirements.txt), node + the cloudron CLI, bash, git, tar.
|
|
# If the toolchain pin changes, rebuild that image — see its Dockerfile.
|
|
#
|
|
# Secrets required (Woodpecker repo secret, name `cloudron_token`):
|
|
# cloudron_token = the Cloudron API token used by publishing/deploy.sh
|
|
# Do not put credentials in this file.
|
|
|
|
when:
|
|
- event: manual
|
|
|
|
steps:
|
|
- name: build
|
|
image: bash
|
|
commands:
|
|
# Reuses the toolchain pre-installed in the agent image; build.sh only
|
|
# creates/installs a venv if the one given is missing, which it is not.
|
|
- publishing/build.sh /opt/docs-venv
|
|
|
|
- name: deploy
|
|
image: bash
|
|
commands:
|
|
# deploy.sh drives the Cloudron `cloudron` CLI (a node program) via
|
|
# `cloudron exec`; node, the CLI, bash, git and tar are all in the agent
|
|
# image. The build it publishes is the shared workspace .site-build/.
|
|
- publishing/deploy.sh
|
|
environment:
|
|
CLOUDRON_TOKEN:
|
|
from_secret: cloudron_token
|