Fix staging deployment #4
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI (Staging PR) | |
| on: | |
| pull_request: | |
| branches: | |
| - staging | |
| jobs: | |
| php-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: 8.3 | |
| tools: composer:v2 | |
| coverage: none | |
| - name: Install PHP dependencies (with dev) | |
| run: composer install --no-interaction --prefer-dist --optimize-autoloader | |
| - name: Prepare .env for tests | |
| run: | | |
| cp .env.example .env | |
| php artisan key:generate | |
| env: | |
| APP_ENV: testing | |
| # If you have tests, this is where they run | |
| - name: Run Laravel test suite | |
| run: php artisan test | |
| # Optional: ensure Vite build still works | |
| frontend-build: | |
| runs-on: ubuntu-latest | |
| needs: php-tests | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - name: Install frontend dependencies | |
| run: npm ci | |
| - name: Build assets | |
| run: npm run build |