@@ -71,37 +71,21 @@ jobs:
7171 - name : Generate app key
7272 run : php artisan key:generate --ansi
7373
74- # --------------------------------------------------------------
75- # Wait until MySQL is ready to accept connections
76- # --------------------------------------------------------------
77- - name : Wait for MySQL to be ready
78- run : |
79- echo "Waiting for MySQL to be ready..."
80- until mysqladmin ping -h 127.0.0.1 -P 3306 --silent; do
81- sleep 3
82- done
83-
84- # --------------------------------------------------------------
85- # Run migrations (uses the `DB_` variables defined at the top)
86- # --------------------------------------------------------------
87- - name : Run database migrations
88- run : php artisan migrate --force
89-
9074
9175 # --------------------------------------------------------------
9276 # Node Setup
9377 # --------------------------------------------------------------
94- - name : Install Node.js
78+ - name : Setup Node.js
9579 uses : actions/setup-node@v3
9680 with :
9781 node-version : 20
98-
99- - name : Install frontend dependencies
82+
83+ - name : Install NPM dependencies
10084 run : npm ci
101-
102- - name : Build Vite assets
85+
86+ - name : Build assets
10387 run : npm run build
104-
88+
10589 - name : Cache node modules
10690 uses : actions/cache@v3
10791 with :
@@ -110,6 +94,23 @@ jobs:
11094 restore-keys : |
11195 ${{ runner.os }}-node-
11296
97+
98+ # --------------------------------------------------------------
99+ # Wait until MySQL is ready to accept connections
100+ # --------------------------------------------------------------
101+ - name : Wait for MySQL to be ready
102+ run : |
103+ echo "Waiting for MySQL to be ready..."
104+ until mysqladmin ping -h 127.0.0.1 -P 3306 --silent; do
105+ sleep 3
106+ done
107+
108+ # --------------------------------------------------------------
109+ # Run migrations (uses the `DB_` variables defined at the top)
110+ # --------------------------------------------------------------
111+ - name : Run database migrations
112+ run : php artisan migrate --force
113+
113114 # --------------------------------------------------------------
114115 # Run all tests (feature + unit)
115116 # --------------------------------------------------------------
0 commit comments