This implementation uses GitHub Actions to build assets and create deployment artifacts, eliminating server-side building and reducing deployment time and resource usage.
The GITHUB_TOKEN is automatically provided by GitHub Actions and is already configured in the workflow. No additional setup required.
If you need to test deployments locally:
-
Create a Personal Access Token:
- Go to GitHub → Settings → Developer settings → Personal access tokens → Tokens (classic)
- Generate new token with
repoandactions:readpermissions - Copy the token
-
Set Environment Variable:
# Windows PowerShell $env:GITHUB_TOKEN="your_token_here" # Linux/Mac export GITHUB_TOKEN="your_token_here"
- Builds assets using
npm run production - Creates deployment package excluding unnecessary files (node_modules, .git, tests)
- Uploads artifacts to GitHub with SHA-based naming
- Deploys using deployphp with environment variables for token access
- PHP 8.3 Environment: The deployment now runs on PHP 8.3.
- Downloads CI artifacts using GitHub API: This replaces server-side building, so
npmoryarnare no longer required on the server. - Dynamic SQS Queues: Queue names are now environment-prefixed (
prod-,dev-, orloc-) as defined inconfig/services.php. - Filament & OpCache: Automated tasks now handle Filament asset optimization and OpCache resets during deployment.
- Checks queue status before restarting to prevent job interruption
- Cleans up temporary files and node_modules automatically
- Assets built once in GitHub Actions
- Deployed as artifacts, no server-side building
- Faster deployments with reduced server resource usage
queue:countcommand checks status before restarting.- Dynamic Prefixing: SQS queues are dynamically named based on the environment (e.g.,
prod-batch-trigger).
The deployment checks these queues by default. Note that names are now derived from the APP_ENV prefix:
{{prefix}}-export{{prefix}}-geolocate{{prefix}}-pusher_classification
To modify queue names, edit the $queues array in deploy/custom.php:
$queues = ['your_queue_1', 'your_queue_2']; // Update as neededTest the queue counting functionality:
# Check default queue
php artisan queue:count
# Check specific queue
php artisan queue:count exportDeploy to different environments:
# Production (main branch)
php deployer.phar deploy production
# Development (development branch)
php deployer.phar deploy development- Faster deployments: No server-side asset building
- Reduced server load: No yarn/npm installation on server
- Job protection: Queue-aware restart prevention
- Consistent builds: Assets built in controlled CI environment
- Automatic cleanup: No manual file management required
- Ensure
GITHUB_TOKENhas proper permissions - Verify queue names match your
.envconfiguration - Check artifact retention (set to 30 days)
- Monitor deployment logs for any API rate limiting