Deploy to the primary production Heroku App via Actions (#21807)
* Update the production deployment workflow to target the main Heroku app Without exposing our internal Heroku app name! * Refactor the staging deployment script a bit to match more closely * Use the HEROKU_PRODUCTION_APP_NAME Secret in the workflow * Add a note about the newly required environment variable for production deployment into the local deploy script * Add critical errors if the HEROKU_PRODUCTION_APP_NAME is missing * Extract HEROKU_PRODUCTION_APP_NAME from process.env
This commit is contained in:
@@ -64,11 +64,12 @@ export default async function deployToProduction({
|
||||
let deploymentId = null
|
||||
let logUrl = workflowRunLog
|
||||
|
||||
const appName = 'help-docs-prod-gha'
|
||||
const homepageUrl = `https://${appName}.herokuapp.com/`
|
||||
const appName = process.env.HEROKU_PRODUCTION_APP_NAME
|
||||
const environment = 'production'
|
||||
const homepageUrl = 'https://docs.github.com/'
|
||||
|
||||
try {
|
||||
const title = `branch '${branch}' at commit '${sha}' in the 'production' environment as '${appName}'`
|
||||
const title = `branch '${branch}' at commit '${sha}' in the '${environment}' environment`
|
||||
|
||||
console.log(`About to deploy ${title}...`)
|
||||
|
||||
@@ -81,7 +82,7 @@ export default async function deployToProduction({
|
||||
ref: sha,
|
||||
|
||||
// In the GitHub API, there can only be one active deployment per environment.
|
||||
environment: appName,
|
||||
environment,
|
||||
|
||||
// The status contexts to verify against commit status checks. If you omit
|
||||
// this parameter, GitHub verifies all unique contexts before creating a
|
||||
|
||||
Reference in New Issue
Block a user