35 lines
748 B
YAML
35 lines
748 B
YAML
name: Run test then deploy on release.
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set PHP version
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: '8.1'
|
|
|
|
- name: Install composer dependencies
|
|
run: composer install --quiet --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
|
|
|
|
- name: Execute tests
|
|
run: php vendor/bin/phpunit
|
|
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Trigger Forge
|
|
uses: jbrooksuk/laravel-forge-action@v1.0.2
|
|
with:
|
|
trigger_url: ${{ secrets.TRIGGER_URL }}
|
|
needs: test
|