Fix mobile organization switcher #85
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: Deploy | |
| on: | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| tests: | |
| name: Run Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Copy .env | |
| run: php -r "file_exists('.env') || copy('.env.example', '.env');" | |
| - name: Install PHP Dependencies | |
| run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
| - name: Install Node Dependencies | |
| run: npm ci | |
| - name: Generate key | |
| run: php artisan key:generate | |
| # - name: Run Laravel Pint | |
| # run: vendor/bin/pint --test | |
| # - name: PHP Lint | |
| # run: find app tests -name "*.php" -print0 | xargs -0 -n1 php -l | |
| - name: Run ESLint | |
| run: npm run lint | |
| - name: Run Tests | |
| run: php artisan test | |
| deploy: | |
| name: Deploy to Production to Forge | |
| needs: tests | |
| runs-on: ubuntu-latest | |
| environment: production | |
| steps: | |
| - name: Deploy to Forge | |
| uses: fjogeleit/http-request-action@v1 | |
| with: | |
| url: ${{ secrets.FORGE_DEPLOY_URL }} | |
| method: 'POST' |