From 43cf1534b17e7b9dc1afabdb40eb8354db5e416e Mon Sep 17 00:00:00 2001 From: test Date: Mon, 16 Nov 2026 07:43:27 -0300 Subject: [PATCH] feat(deploy): add a purge input Passed to Deployer as -o purge= for deployer-genero's purge.php. Empty or default keeps the mode the repo's deploy.php sets. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/deploy.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ea09d40..671ea60 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -22,6 +22,13 @@ on: Re-run composer test before deploying. Defaults to true; set false in repos where the ref being deployed has already passed CI: Test, to skip the test run and the npm install that only exists to feed it. + purge: + type: string + default: '' + description: > + How the deploy purges the page caches: auto, none, soft or hard (see + deployer-genero's purge.php). Empty, or `default`, keeps the mode the + repo's deploy.php sets. secrets: DEPLOY_SSH_PRIVATE_KEY: required: true @@ -124,4 +131,10 @@ jobs: env: DEPLOY_ENV: ${{ inputs.environment }} LOG_LEVEL: ${{ inputs.log_level }} - run: ./vendor/bin/dep deploy "$DEPLOY_ENV" "$LOG_LEVEL" + PURGE: ${{ inputs.purge }} + run: | + if [ -n "$PURGE" ] && [ "$PURGE" != default ]; then + ./vendor/bin/dep deploy "$DEPLOY_ENV" "$LOG_LEVEL" -o "purge=$PURGE" + else + ./vendor/bin/dep deploy "$DEPLOY_ENV" "$LOG_LEVEL" + fi