1
0
mirror of synced 2025-12-22 11:26:57 -05:00

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:
James M. Greene
2021-09-29 14:43:29 -05:00
committed by GitHub
parent 6e5cd5f20e
commit 90d030a41e
4 changed files with 37 additions and 11 deletions

View File

@@ -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