-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (40 loc) · 1.24 KB
/
ci.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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set Node.js 16.x
uses: actions/setup-node@v3.5.1
with:
node-version: 16.x
- name: Install Yarn Dependencies
uses: borales/actions-yarn@v4
with:
cmd: install
- name: Build Frontend
uses: borales/actions-yarn@v4
with:
cmd: prod
- name: Install Composer Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
- name: Prepare Laravel Application
run: |
cp .env.example .env
php artisan key:generate
- name: Run Test Suite
run: php artisan test
deploy:
runs-on: ubuntu-latest
needs: build-and-test
if: github.ref == 'refs/heads/main'
steps:
- name: Deploy to Laravel Forge
run: curl ${{ secrets.FORGE_DEPLOYMENT_WEBHOOK }}