Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AqpXh3hQMMaC74pTjFq4it
3.7 KiB
3.7 KiB
Gitea Actions pipeline (peptide-repo)
Since 2026-10-24 every peptide-repo plugin/theme builds and deploys from
git.protopeer.com/peptide-repo, not GitHub. GitHub's .github/workflows are
left in the repos but Gitea ignores them (a repo with .gitea/workflows uses
only that folder).
How it fits together
- Shared logic lives once, as composite actions in this repo under
.gitea/actions/:deploy,smoke,ci-lint-php,ci-phpcs,ci-file-size,ci-phpunit,ci-lint-js,audit-direct-push. Gitea 1.25 cannot run reusable workflows (workflow_call), which is why this is not a 1:1 copy of the GitHubdeploy-app.yml/ci.yml. - Each repo's
.gitea/workflows/pipeline.ymlis generated bytools/gitea-pipeline/render.pyfromtools/gitea-pipeline/repos.json. Change a repo's settings inrepos.json, re-render, commit the output. Do not hand-edit the generated files. - Job graph: lint-php / phpcs / file-size / phpunit / lint-js (+ repo extras)
-> deploy-staging -> smoke (gate) -> deploy-production. Deploys run on pushes
to
mainand on manual runs ofmain. - Runners: CI jobs run on the shared docker runner (
ubuntu-latest) insidegit.protopeer.com/peptide-repo/ci-php:2026-10(PHP 8.1/8.2/8.3 + Composer, built fromci-image/). Deploy and smoke run on the host runnerpeptide-vps-gitea(systemdgitea-runner-peptide, usergtrunner, labelpeptide-vps) on the KVM8, one job at a time, like the old GitHub runner. - Secrets / variables are org-level on Gitea
peptide-repo:SSH_PRIVATE_KEY(deploy keygitea-peptide-deploy-20261024on Hostinger),SSH_HOST,SSH_PORT,SSH_USERNAME,STAGING_WP_ADMIN_USER(gitea-smoke, staging-only admin),STAGING_WP_ADMIN_PASSWORD; variablePROD_DEPLOY_ENABLED.
Switches and recovery
- Kill switch: set org variable
PROD_DEPLOY_ENABLEDto anything buttrue-> production deploys (andpeptide-news-pluginrollback) are skipped; staging + smoke still run. - Redeploy / retry: run the repo's
CI / Deployworkflow onmainmanually. - Roll back news plugin:
peptide-news-plugin->Rollback Deployment(workflow_dispatch, optional commit SHA). Same deploy action as normal. - Drift:
deploy-health.yml(daily 13:00 UTC / 21:00 SGT) compares the commit stamped in~/.peptide-deploys/production/<target>on Hostinger with each repo'smain, and opens one "Deploy drift detected" issue here. - Back to GitHub (emergency):
systemctl enable --now actions.runner.peptide-repo.peptide-vpson the KVM8 and setPROD_DEPLOY_ENABLED=falsehere. Only works while GitHub's Hostinger deploy key is still authorised.
Differences from the GitHub pipeline (deliberate)
.giteais also excluded from rsync.- JS lint uses Node 22 (GitHub used Node 20, now end-of-life).
- Smoke login confirms WordPress's periodic "Administration email verification" screen instead of timing out on it (it had been blocking smoke since 2026-09-10, when staging's admin-email check expired).
- Production stamps the deployed commit for deploy-health (replaces GitHub Deployments).
- PHP matrices are literal lists (avoids Gitea's
fromJsonmatrix bug).
Known gaps
pr-visioncto-review.yml(AI PR review via OpenRouter) is not ported: itsOPENROUTER_API_KEY/CTO_ADMIN_TOKENsecrets only exist on GitHub and it calls GitHub's review API.- The LiteSpeed purge in the production deploy runs relative to
$HOME, so it is effectively a no-op - same as on GitHub. Kept as-is, not fixed. - Issues / PR history of repos other than peptide-e2e stayed on GitHub (the migration hit GitHub's anonymous API rate limit); GitHub repos are to be archived, not deleted.