1010class DeploySite extends Command
1111{
1212 protected $ signature = 'app:deploy-site
13+ {forge-cli-token : The Forge CLI token to use}
14+ {forge-server-id : The Forge server ID to use}
15+ {root-domain : The root domain to use (example.com)}
16+ {git-provider : The git provider to use (github, gitlab)}
17+ {repository : The repository to use (username/repository)}
1318 {branch : The name of the branch to deploy (will be used for the subdomain and database name)}
1419 {php-version : The PHP version to use (php82, php81, php80, php74)}
1520 {env : Base64 encoded .env file to use for the site} ' ;
@@ -24,7 +29,7 @@ class DeploySite extends Command
2429 public function handle (): void
2530 {
2631 $ this ->buildForge ();
27- $ this ->domain = $ this ->argument ('branch ' ) . '. ' . config ( ' forge.root_domain ' );
32+ $ this ->domain = $ this ->argument ('branch ' ) . '. ' . $ this -> argument ( ' root-domain ' );
2833
2934 try {
3035 $ site = $ this ->getSite ();
@@ -63,8 +68,8 @@ protected function createSite(): Site
6368
6469 $ this ->output ->info ('Site created, installing git repository... ' );
6570 $ this ->forge ->installGitRepositoryOnSite ($ this ->forgeServerId , $ site ->id , [
66- 'provider ' => config ( ' forge.git_provider ' ),
67- 'repository ' => config ( ' forge. repository ' ),
71+ 'provider ' => $ this -> argument ( ' git-provider ' ),
72+ 'repository ' => $ this -> argument ( ' repository ' ),
6873 'branch ' => $ this ->argument ('branch ' ),
6974 'composer ' => true
7075 ]);
@@ -87,8 +92,8 @@ protected function deploySite(Site $site): void
8792
8893 protected function buildForge (): void
8994 {
90- $ this ->forgeApiToken = config ('forge. token ' );
91- $ this ->forgeServerId = config ('forge.server_id ' );
95+ $ this ->forgeApiToken = $ this -> argument ('forge-cli- token ' );
96+ $ this ->forgeServerId = $ this -> argument ('forge-server-id ' );
9297
9398 if (empty ($ this ->forgeApiToken )) {
9499 $ this ->forgeApiToken = $ this ->ask ('What is your Forge API token? ' );
0 commit comments