From b31d01997aa98fcc8108a252029a99cb483af77d Mon Sep 17 00:00:00 2001 From: peptiderepo-ops Date: Sat, 24 Oct 2026 09:57:31 +0000 Subject: [PATCH] ci(gitea): deploy also on manual runs of main Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AqpXh3hQMMaC74pTjFq4it --- tools/gitea-pipeline/render.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/gitea-pipeline/render.py b/tools/gitea-pipeline/render.py index 7c26073..5ae111a 100644 --- a/tools/gitea-pipeline/render.py +++ b/tools/gitea-pipeline/render.py @@ -19,6 +19,10 @@ DEFAULTS = {"tests": "stubs", "has_js": False, "line_limit_paths": "includes", "enforce_300": True, "phpcs_autofix": True, "audit": True, "php_versions": ["8.1", "8.2", "8.3"], "extras": []} MAIN_PUSH = "github.event_name == 'push' && github.ref == 'refs/heads/main'" +# Deploys also run on a manual (workflow_dispatch) run of main, so a failed or +# drifted deploy can be redone without a dummy commit (deploy-health says so). +MAIN_DEPLOY = ("(github.event_name == 'push' || github.event_name == 'workflow_dispatch')" + " && github.ref == 'refs/heads/main'") EXTRAS = { "check-constants": """ @@ -200,7 +204,7 @@ jobs: deploy-staging: name: Deploy to staging needs: {needs} - if: ${{{{ {MAIN_PUSH} }}}} + if: ${{{{ {MAIN_DEPLOY} }}}} runs-on: peptide-vps steps: - uses: actions/checkout@v4 @@ -225,7 +229,7 @@ jobs: # Smoke is a gate: production runs only if staging deploy AND smoke succeeded. # PROD_DEPLOY_ENABLED (org variable) is the cutover switch / kill switch. needs: [deploy-staging, smoke] - if: ${{{{ vars.PROD_DEPLOY_ENABLED == 'true' && {MAIN_PUSH} }}}} + if: ${{{{ vars.PROD_DEPLOY_ENABLED == 'true' && {MAIN_DEPLOY} }}}} runs-on: peptide-vps steps: - uses: actions/checkout@v4