Skip to content

feat(ci): Add SVN secrets #2

feat(ci): Add SVN secrets

feat(ci): Add SVN secrets #2

name: Test WordPress.org Deploy (Dry Run)
on:
push:
branches:
- build-test
workflow_dispatch: # Allow manual triggering
jobs:
test-wordpress-deploy:
name: Test WordPress Deploy (Dry Run)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
tools: composer
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install PHP dependencies (production only)
run: composer install --no-dev --optimize-autoloader --prefer-dist --no-interaction
- name: Install Node.js dependencies
run: npm ci
- name: Build frontend assets
run: npm run build
- name: Run tests
run: |
chmod +x scripts/run-tests.sh
./scripts/run-tests.sh
- name: Reinstall production dependencies
run: |
echo "Reinstalling production-only composer dependencies..."
composer install --no-dev --optimize-autoloader --prefer-dist --no-interaction
- name: Install Subversion
run: sudo apt-get update && sudo apt-get install -y subversion
- name: WordPress Plugin Deploy (DRY RUN)
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
with:
dry-run: true
generate-zip: true
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SLUG: jwt-authentication-for-wp-rest-api
# Note: SVN credentials not needed for dry-run
- name: Upload deployment preview
uses: actions/upload-artifact@v4
with:
name: wordpress-deploy-preview-${{ github.run_number }}
path: ${{ steps.deploy.outputs.zip-path }}
retention-days: 7
- name: Display deployment info
run: |
echo "🔍 Dry run completed!"
echo "📦 Preview ZIP has been uploaded as an artifact"
echo "ℹ️ This was a test run - nothing was pushed to WordPress.org"