Skip to content

Commit

Permalink
fix: deploy next.js app
Browse files Browse the repository at this point in the history
  • Loading branch information
Jikun committed Sep 19, 2023
1 parent 03d034a commit 30f2d7a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/cli/commands/deploy/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ export async function deploy(options: SWACLIConfig) {
DEPLOYMENT_TOKEN: deploymentToken,
// /!\ Static site client doesn't use OUTPUT_LOCATION at all if SKIP_APP_BUILD is set,
// so you need to provide the output path as the app location
APP_LOCATION: userWorkflowConfig?.outputLocation,
// OUTPUT_LOCATION: outputLocation,
APP_LOCATION: userWorkflowConfig?.appLocation,
OUTPUT_LOCATION: userWorkflowConfig?.outputLocation,
API_LOCATION: userWorkflowConfig?.apiLocation,
DATA_API_LOCATION: userWorkflowConfig?.dataApiLocation,
// If config file is not in output location, we need to tell where to find it
Expand Down Expand Up @@ -271,13 +271,15 @@ export async function deploy(options: SWACLIConfig) {
logger.silly(`Deploying using ${cliEnv.SWA_CLI_DEPLOY_BINARY}`);
logger.silly(`Deploying using the following options:`);
logger.silly({ env: { ...cliEnv, ...deployClientEnv } });
logger.silly(`StaticSiteClient working directory: ${path.dirname(userWorkflowConfig?.appLocation!)}`);

spinner.start(`Preparing deployment. Please wait...`);

const child = spawn(binary, [], {
env: {
...swaCLIEnv(cliEnv, deployClientEnv),
},
cwd: path.dirname(userWorkflowConfig?.appLocation!),
});

let projectUrl = "";
Expand Down

0 comments on commit 30f2d7a

Please sign in to comment.