-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (50 loc) · 1.28 KB
/
Copy pathdeploy.yml
File metadata and controls
58 lines (50 loc) · 1.28 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
name: CI and deploy
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
check:
runs-on: [self-hosted, linux, x64]
concurrency:
group: check-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
set -e
cp .env.example .env
composer install --no-interaction --prefer-dist
php artisan key:generate
npm ci
- name: Typecheck
run: npm run typecheck
- name: Build
run: npm run build
- name: Frontend tests
run: npm test
env:
LARAVEL_BYPASS_ENV_CHECK: 1
- name: Tests
run: php artisan test --compact
deploy:
needs: check
if: github.event_name != 'pull_request'
runs-on: [self-hosted, linux, x64]
concurrency:
group: deploy
cancel-in-progress: false
steps:
- name: Pull and deploy
run: |
set -e
cd /srv/apps/blueva-menu
git pull --ff-only
composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader
npm ci
npm run build
php artisan migrate --force
php artisan optimize:clear
php artisan optimize