main, with plan previews on pull requests.
Prerequisites
Prerequisites
- A
devhelm.ymlfile 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:
--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:
Gate merges on config validity
Use--dry-run --detailed-exitcode to block PRs that would cause deployment errors:
0— no changes needed10— changes pending (valid config, would apply changes)1— error (invalid config or API failure)
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
Deploy fails with 'lock held'
Deploy fails with 'lock held'
Another deploy is running. Deploy locks prevent concurrent deploys. Wait for the other deploy to finish, or force unlock if it’s stuck:
Validation passes but deploy fails
Validation passes but deploy fails
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.
setup-devhelm action fails
setup-devhelm action fails
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.