mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-03 05:20:38 -05:00
docs: push deploy message to remote origin (matching current branch)
This commit is contained in:
@@ -121,10 +121,15 @@ function prompt (questions) {
|
||||
return Promise.resolve(inquirer.prompt(questions))
|
||||
}
|
||||
|
||||
function commitMessage (env) {
|
||||
function commitMessage (env, branch) {
|
||||
// commit empty message that we deployed
|
||||
return repo.commitAsync(`deployed docs to ${env} [skip ci]`, {
|
||||
'allow-empty': true,
|
||||
})
|
||||
.then(function () {
|
||||
// and push it to the origin with the current branch
|
||||
return repo.remote_pushAsync("origin", branch)
|
||||
})
|
||||
}
|
||||
|
||||
getS3Credentials()
|
||||
@@ -149,10 +154,10 @@ getS3Credentials()
|
||||
throw new Error(`Unknown environment: ${env}`)
|
||||
}
|
||||
})
|
||||
})
|
||||
.then((env) => {
|
||||
return commitMessage(env)
|
||||
.then(uploadToS3.bind(null, env))
|
||||
.then((env) => {
|
||||
return commitMessage(env, branch)
|
||||
.then(uploadToS3.bind(null, env))
|
||||
})
|
||||
})
|
||||
.then(() => {
|
||||
console.log(chalk.yellow('\n==============================\n'))
|
||||
|
||||
Reference in New Issue
Block a user