fix(v2): fix deploy script

This commit is contained in:
endiliey 2019-04-14 01:20:36 +08:00
parent d097f73285
commit 1d133e7169

View file

@ -129,7 +129,7 @@ module.exports = async function deploy(siteDir) {
shell.cd('../..'); shell.cd('../..');
const fromPath = path.join('build'); const fromPath = path.join('build');
const toPath = path.join('build', `${projectName}-${deploymentBranch}}`); const toPath = path.join('temp', `${projectName}-${deploymentBranch}`);
// In github.io case, project is deployed to root. Need to not recursively // In github.io case, project is deployed to root. Need to not recursively
// copy the deployment-branch to be. // copy the deployment-branch to be.
const excludePath = `${projectName}-${deploymentBranch}`; const excludePath = `${projectName}-${deploymentBranch}`;
@ -156,7 +156,7 @@ module.exports = async function deploy(siteDir) {
); );
} }
shell.cd(path.join('build', `${projectName}-${deploymentBranch}`)); shell.cd(toPath);
shell.exec('git add --all'); shell.exec('git add --all');
const commitMessage = const commitMessage =