mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-20 06:01:12 -06:00
docs: commit after successful deploy
This commit is contained in:
@@ -103,7 +103,7 @@ function publishToS3 (publisher) {
|
||||
}
|
||||
|
||||
function uploadToS3 (env) {
|
||||
getS3Credentials()
|
||||
return getS3Credentials()
|
||||
.then((json) => {
|
||||
const bucket = json[`bucket-${env}`] || (function () {
|
||||
throw new Error(`Could not find a bucket for environment: ${env}`)
|
||||
@@ -122,8 +122,18 @@ function prompt (questions) {
|
||||
}
|
||||
|
||||
function commitMessage (env, branch) {
|
||||
const msg = `deployed docs to ${env} [skip ci]`
|
||||
|
||||
console.log(
|
||||
'\n',
|
||||
'Commiting and pushing to remote origin:',
|
||||
'\n',
|
||||
chalk.green(`(${branch})`),
|
||||
chalk.cyan(msg)
|
||||
)
|
||||
|
||||
// commit empty message that we deployed
|
||||
return repo.commitAsync(`deployed docs to ${env} [skip ci]`, {
|
||||
return repo.commitAsync(msg, {
|
||||
'allow-empty': true,
|
||||
})
|
||||
.then(function () {
|
||||
@@ -155,8 +165,10 @@ getS3Credentials()
|
||||
}
|
||||
})
|
||||
.then((env) => {
|
||||
return commitMessage(env, branch)
|
||||
.then(uploadToS3.bind(null, env))
|
||||
return uploadToS3(env)
|
||||
.then(() => {
|
||||
return commitMessage(env, branch)
|
||||
})
|
||||
})
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
Reference in New Issue
Block a user