Skip to content

Track production/development deploys via GitHub environments#279

Merged
thehabes merged 1 commit into
mainfrom
fix-stale-deployments
Jun 12, 2026
Merged

Track production/development deploys via GitHub environments#279
thehabes merged 1 commit into
mainfrom
fix-stale-deployments

Conversation

@thehabes

Copy link
Copy Markdown
Member

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.yaml deploy job → environment: production
  • cd_dev.yaml deploy job → environment: development

GitHub 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/development environments 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.
  • No change to deploy logic, triggers, runners, or secrets — one added line per file.

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.
@thehabes thehabes requested a review from cubap as a code owner June 12, 2026 17:50
@thehabes thehabes deployed to development June 12, 2026 17:54 — with GitHub Actions Active
@thehabes thehabes merged commit fa4cdfa into main Jun 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant