Skip to content
Open

Fixed #839

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/server/events/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down