Skip to content

Commit 557d9f6

Browse files
committed
github: actions: Add composite server build
1 parent 2237318 commit 557d9f6

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: setup-server
2+
description: Sets up the server environment for the application.
3+
4+
inputs:
5+
php-version:
6+
description: 'The PHP version to use'
7+
required: true
8+
default: '8.4'
9+
node-version:
10+
description: 'The Node.js version to use'
11+
required: true
12+
default: '22'
13+
14+
runs:
15+
using: 'composite'
16+
steps:
17+
- name: Checkout Code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup PHP
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: '${{ inputs.php-version }}'
24+
tools: composer:v2
25+
coverage: xdebug
26+
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: '${{ inputs.node-version }}'
31+
cache: 'npm'
32+
33+
- name: Install Node Dependencies
34+
shell: bash
35+
run: npm ci
36+
37+
- name: Build Assets
38+
shell: bash
39+
run: npm run build
40+
41+
- name: Install Composer Dependencies
42+
shell: bash
43+
run: composer install --no-interaction --prefer-dist --optimize-autoloader
44+
45+
- name: Copy Environment File
46+
shell: bash
47+
run: cp .env.example .env
48+
49+
- name: Generate Application Key
50+
shell: bash
51+
run: php artisan key:generate

0 commit comments

Comments
 (0)