Deploy Laravel for
GitHub Actions
View on GitHub
Step 5: Other configuration
-
Vite or Mix?
By default, the script uses Vite to build your javascript bundle (as has been the default since Laravel 9). If you are still using Laravel Mix, change the line
npm run build
tonpm run production
in the.github/workflows/ci-cd.yml
file. -
Vite/Mix environment variables
Laravel allows you to use variables from your
.env
file in your javascript bundle. These variables start withMIX_
orVITE_
. In your javascript code they look like this:process.env.MIX_PUSHER_APP_KEY
. If you use these types of variables, follow this post to configure them. -
Laravel Nova
If you application uses Laravel Nova, follow the instructions in this post.