Track production/development deploys via GitHub environments#279
Merged
Conversation
Add 'environment: production' to the cd_prod deploy job and 'environment: development' to the cd_dev deploy job so each real pm2 deploy registers a GitHub Deployment (active on success, prior auto-inactivated), matching how TPEN-services tracks deployments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Wire the existing pm2 deploy jobs to GitHub's native
environment:key so real dev/prod deploys are tracked as Deployments — the same way TPEN-services does it.cd_prod.yamldeploy job →environment: productioncd_dev.yamldeploy job →environment: developmentGitHub creates a Deployment bound to each deploy job: active when the pm2 deploy succeeds, and the prior deployment to that environment is auto-inactivated. The
production/developmentenvironments are auto-created on first run.Why
The Environments panel currently shows only stale, inactive Heroku deployments (none since 2024). The real deploys (pm2 over SSH on self-hosted runners) were invisible to GitHub. The dead Heroku environment is being deleted separately.
Notes
environment:is added to the deploy job only (not test) — these repos use repo-level secrets, so there is no need for env-scoped secret access on the test job; this keeps one Deployment per real deploy.