-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (35 loc) · 1.14 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# This is a basic workflow to help you get started with Actions
name: Deploy
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test-php:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
- name: Setup Node
uses: actions/setup-node@v3
- name: Install Composer dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
- name: Run npm
run: npm ci && npm run build
- name: Prepare Laravel Application
run: |
cp .env.example .env
php artisan key:generate
- name: Run tests
run: ./vendor/bin/phpunit
- name: Deploy to Laravel Forge
run: curl ${{ secrets.FORGE_DEPLOYMENT_WEBHOOK }}