Files
peptide-search-ai/.github/workflows/deploy.yml
peptiderepo b3bf6451a8 ci: fix peptide-e2e org ref + deploy.yml permissions for reusable workflow
1. Update stale peptiderepo/peptide-e2e ref to peptide-repo/peptide-e2e.
   Reusable workflow uses: refs do not follow GitHub transfer redirects.

2. Fix permissions: contents: read → write so nested reusable ci.yml
   (requires write for phpcbf auto-commit) can run without startup_failure.

Agent-Session: fix-e2e-ref-20260617
2026-06-17 11:34:08 +07:00

44 lines
1020 B
YAML
Executable File

name: Deploy to WordPress
on:
push:
branches: [ main ]
permissions:
contents: write
concurrency:
group: deploy-peptide-search-ai
cancel-in-progress: true
jobs:
test:
name: Pre-deploy tests
uses: ./.github/workflows/ci.yml
secrets: inherit
validate:
name: Validate deployment
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
with:
ref: main
- name: Verify PSA_VERSION constant
run: |
if grep -q "define( 'PSA_VERSION'" peptide-search-ai.php; then
version=$(grep "define( 'PSA_VERSION'" peptide-search-ai.php | sed "s/.*'\([^']*\)'.*/\1/")
echo "✓ PSA_VERSION: $version"
else
echo "❌ PSA_VERSION not found"; exit 1
fi
deploy:
name: Deploy (shared pipeline)
needs: validate
uses: peptide-repo/peptide-e2e/.github/workflows/deploy-app.yml@main
with:
target_path: wp-content/plugins/peptide-search-ai
secrets: inherit