Skip to main content
By the end of this guide, you’ll have a GitHub Actions workflow that validates, plans, and deploys your monitoring config on every push to main, with plan previews on pull requests.
  • A devhelm.yml file in your repository — see Monitoring as Code tutorial
  • A DevHelm API token stored as a GitHub secret (DEVHELM_API_TOKEN)

Deploy workflow

Create .github/workflows/devhelm-deploy.yml:
The --yes flag skips interactive confirmation — required for non-interactive CI environments.

PR preview workflow

Show what would change before merging. Create .github/workflows/devhelm-plan.yml:
The plan output shows resources to create, update, and delete — review it in the Actions log before merging.

Gate merges on config validity

Use --dry-run --detailed-exitcode to block PRs that would cause deployment errors:
Exit codes:
  • 0 — no changes needed
  • 10 — changes pending (valid config, would apply changes)
  • 4 — validation error (invalid config)
  • 11 — API error (auth failure, held deploy lock, server error)
Use this as a required status check to prevent merging broken configs.

Add a maintenance window for deploys

Suppress alerts during the deployment window:

Multiple environments

For staging and production environments, see Multi-environment config. Use separate workflow files or environment-specific API tokens:

Troubleshooting

Another deploy is running. Deploy locks prevent concurrent deploys. Wait for the other deploy to finish, or force unlock if it’s stuck:
Validation checks syntax offline. The API may reject the config if a referenced secret doesn’t exist or a resource name conflicts. Check the error message for details.
Verify that DEVHELM_API_TOKEN is set as a repository secret (not an environment variable). The action uses it to authenticate all CLI commands.

Next steps

Multi-environment config

Manage staging and production separately.

GitHub Actions setup

Full setup-devhelm action reference.

Monitoring as Code tutorial

Complete YAML format and workflow guide.