Deploying through Github Actions Fails #12738
Replies: 4 comments
-
|
You can probably get around this for now by making sure the sqlite file exists and running artisan migrate as part of the deploy script. |
Beta Was this translation helpful? Give feedback.
-
|
I don't use sqlite I use a mysql database hosted in Vapor. Are you suggesting I make a sqlite database with the right tables just for this to get through it's artisan commands? I am working around this for now by deploying manually from my development environment. |
Beta Was this translation helpful? Give feedback.
-
|
I'm suggesting doing the bare minimum just to get your GitHub action to complete. Since you aren't using a database on the GitHub environment, it's failing when looking at the sqlite db. By making sure the file exists (literally an empty file will do) and running artisan migrate, it'll create the sqlite db. You don't need to think about the tables - the migrations will sort that out. The errors should go away. The DB will get discarded when the action finishes. |
Beta Was this translation helpful? Give feedback.
-
|
Another option would be to change the default cache driver in your |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Bug description
While deploying in Github Actions using Vapor I run into issues where all artisan commands are now looking for the database so that Statamic can do it's Statamic\Sites\Sites::__construct() but there is no database present in the build runner environment.
How to reproduce
Create any statamic application or add it to an application.
Deploy that application through Vapor initially.
Setup a Github Action like this to deploy to vapor:
And it will fail to install dependencies
Logs
Environment
Installation
Existing Laravel app
Additional details
No response
Beta Was this translation helpful? Give feedback.
All reactions