fix: proper shared hosting PHP deployment with vendor + frontend assets
API CI/CD / Validate (composer + pint) (push) Failing after 2s
API CI/CD / Test (PHPUnit) (push) Failing after 2s
API CI/CD / Build frontend assets (push) Failing after 39s
API CI/CD / Security audit (push) Failing after 1s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped

- Remove --exclude=vendor and pre-install with --no-dev
- Download frontend build artifacts before deploy
- Add post-deploy artisan commands (migrate, cache, optimize)
- Add alpine container for consistent package management
This commit is contained in:
root
2026-06-20 19:23:51 -04:00
parent b0f24e1530
commit ef0126aaff
2 changed files with 49 additions and 8 deletions
+3 -1
View File
@@ -15,9 +15,11 @@ After pushing, the pipeline will run automatically. The following steps are requ
| Variable Name | Default | Description |
|---|---|---|
| `SSH_PORT` | `22` | SSH port for the deployment server |
| `SSH_TARGET_DIR` | — | Absolute path on the server where the project is deployed |
| `SSH_TARGET_DIR` | — | Absolute path on the server where the Laravel app root goes |
| `PRODUCTION_URL` | — | Public URL of the production site |
> **Note:** The deploy job runs `php artisan migrate`, `config:cache`, `route:cache`, `view:cache`, and `optimize` via SSH after uploading. The PHP CLI binary must be available on the shared hosting server.
## 3. Allow Gitea Actions
- Go to **Settings → Actions** in your Gitea repository