# Woodpecker CI: translate → build → deploy # # Triggered by the Gitea push webhook. The translate step replaces the old # synchronous WordPress save_post hook: publishing in Decap is one git commit, # translation happens here, asynchronously, and every generated sibling lands # as a reviewable bot commit. # # Translation is self-hosted — the model ships inside vienalatina/translate, # so there is no API key and no third-party request. Build that image on the # server before the first run: # docker build -t vienalatina/translate:1 docker/translate # # Secrets to configure in Woodpecker (repo settings → secrets): # gitea_push_token — Gitea token for the translations bot user # (translations@vienalatina.com) with repo write access # # The deploy step writes to the Caddy web root via a host mount, which # requires the repo to be marked "trusted" in Woodpecker. when: - event: push branch: main steps: translate: image: vienalatina/translate:1 pull: false # built locally on the server, never fetched from a registry environment: GITEA_PUSH_TOKEN: from_secret: gitea_push_token commands: - python scripts/translate.py build: image: hugomods/hugo:0.135.0 commands: # Bundle Decap locally so the /admin page makes zero third-party requests. - wget -q -O static/admin/decap-cms.js https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js - hugo --minify deploy: image: alpine:3.20 volumes: - /var/www/vienalatina.com:/deploy-target commands: - apk add --no-cache rsync - rsync -a --delete public/ /deploy-target/