diff --git a/src/server/events/deploy.ts b/src/server/events/deploy.ts index 7af33a9e..aa53066b 100644 --- a/src/server/events/deploy.ts +++ b/src/server/events/deploy.ts @@ -5,8 +5,6 @@ import SftpDeploy from '../plugins/deploys/sftp' export default class DeployEvents { constructor(appInstance: any) { - const { platform } = appInstance.db.setting - const deploy = new Deploy(appInstance) const sftp = new SftpDeploy(appInstance) const renderer = new Renderer(appInstance) @@ -21,12 +19,12 @@ export default class DeployEvents { 'github': deploy, 'coding': deploy, 'sftp': sftp, - } as any)[platform] - + } as any)[appInstance.db.setting.platform] + // render renderer.db.themeConfig.domain = renderer.db.setting.domain await renderer.renderAll() - + // publish const result = await client.publish() event.sender.send('site-published', result) @@ -37,7 +35,7 @@ export default class DeployEvents { 'github': deploy, 'coding': deploy, 'sftp': sftp, - } as any)[platform] + } as any)[appInstance.db.setting.platform] const result = await client.remoteDetect() event.sender.send('remote-detected', result)