PR Vision v0.2.1: dashboard config-marker + KPI health pill + auto-deploy pipeline (#4)

Wire the deferred dashboard visuals (trendline config-change marker from config_version data; KPI per-model health pill) + add .github/workflows/deploy.yml (CI-gated rsync to the prod plugin dir + LiteSpeed purge + health check on push to main) replacing manual rsync.

QA: APPROVE — qa-reviews/pr-vision/2026-06-14-f5cfa39f60db22ac9f223ca1d95ea4954b43d71f.md

Agent-Session: pr-vision v0.2.1 merge
This commit is contained in:
peptiderepo
2026-06-14 20:20:44 +07:00
committed by GitHub
parent 2fcef7a323
commit 43bcb8b17d
13 changed files with 970 additions and 99 deletions

View File

@@ -47,12 +47,24 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: composer:v2, phpcs
- name: Install Composer dependencies
run: composer install --no-interaction --prefer-dist --no-progress
- name: Install WordPress Coding Standards (global)
run: |
composer global config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer global require --no-interaction \
"dealerdirect/phpcodesniffer-composer-installer:^1.0" \
"wp-coding-standards/wpcs:^3.0" \
"phpcsstandards/phpcsutils:^1.0"
- name: Run PHPCS
run: composer run lint
run: |
phpcs --standard=phpcs.xml.dist \
--extensions=php \
--ignore=vendor/*,tests/*,node_modules/* \
--warning-severity=0 \
--report=full \
includes/ pr-vision.php uninstall.php
# ── 300-line file check ──────────────────────────────────────────
file-size:

70
.github/workflows/deploy.yml vendored Normal file
View File

@@ -0,0 +1,70 @@
name: Deploy to Hostinger
on:
push:
branches: [ main ]
permissions:
contents: read
concurrency:
group: deploy-pr-vision
cancel-in-progress: true
jobs:
ci:
name: Pre-deploy CI
uses: ./.github/workflows/ci.yml
deploy:
name: Deploy (rsync to Hostinger PROD)
needs: ci
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_deploy
chmod 600 ~/.ssh/id_deploy
ssh-keyscan -p "${{ secrets.SSH_PORT }}" "${{ secrets.SSH_HOST }}" >> ~/.ssh/known_hosts 2>/dev/null
- name: rsync plugin to PROD
run: |
rsync -az --delete \
--exclude='.git' \
--exclude='.github' \
--exclude='tests' \
--exclude='phpunit.xml.dist' \
--exclude='composer.json' \
--exclude='composer.lock' \
--exclude='vendor' \
--exclude='phpcs.xml.dist' \
--exclude='*.md' \
-e "ssh -p ${{ secrets.SSH_PORT }} -i ~/.ssh/id_deploy -o StrictHostKeyChecking=no" \
./ \
"${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }}:~/domains/peptiderepo.com/public_html/wp-content/plugins/pr-vision/"
- name: Purge LiteSpeed cache
run: |
ssh -p "${{ secrets.SSH_PORT }}" \
-i ~/.ssh/id_deploy \
-o StrictHostKeyChecking=no \
"${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }}" \
'wp --path=~/domains/peptiderepo.com/public_html litespeed-purge all 2>/dev/null || true'
- name: Health check (expect 200 or 403)
run: |
STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
--max-time 15 \
"https://peptiderepo.com/wp-admin/admin.php?page=pr-vision" \
-L --user-agent "GitHub-Actions-Deploy-Health-Check/1.0")
echo "HTTP status: $STATUS"
if [ "$STATUS" = "200" ] || [ "$STATUS" = "403" ]; then
echo "Health check passed."
else
echo "Health check FAILED with status $STATUS"
exit 1
fi