Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #839

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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