Skip to content

Add a Heroku setup script to the deploy-app skill - #217

Open
justwiebe wants to merge 1 commit into
masterfrom
deploy-app-heroku-script
Open

justwiebe wants to merge 1 commit into
masterfrom
deploy-app-heroku-script

Conversation

@justwiebe

Copy link
Copy Markdown
Contributor

Why?

The deploy-app skill's Heroku phase was a dozen hand-run commands, and the user had to run the master key step themselves partway through. This moves that phase into one script the user runs, so the key never reaches the agent and a failed run can simply be run again.

With an empty HEROKU_APP_NAME, the deploy action creates a randomly named Heroku app instead of failing. That happened on boundaryless_circ_planner, so the skill now warns against running the workflow before the variables exist.

What Changed

  • Add heroku_setup beside the deploy-app skill, covering Phase 4 and the GitHub variables
  • Re-running it skips the app, buildpacks and add-ons that already exist
  • Production tiers and the Sentry DSN come from optional environment variables
  • Point the skill's Heroku and GitHub steps at the script

Pre-merge checklist

  • Update relevant READMEs

Notes

Please don't commit version changes within your PR. Versioning is managed through the GitHub Workflow.

I used the script to deploy boundaryless_circ_planner staging, and that app's deploy workflow ran green. I also checked each heroku flag and JSON field against the CLI 10.11.0 manifest and source, and ran staging and production end to end against stub CLIs.

Screenshots

N/A — no UI changes

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@justwiebe justwiebe self-assigned this Oct 19, 2026
@justwiebe
justwiebe requested review from OutlawAndy and mark-kraemer and a balanced review from Copilot October 19, 2026 21:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved deployment correctness issues can prevent successful setup or push code to the wrong app.

5 open issues
What changed in this PR

Moves the deploy-app skill’s manual Heroku setup into a user-run script, keeping the master key outside the agent’s context.

Changes:

  • Automates Heroku provisioning, deployment, health checks, and GitHub environment variables.
  • Supports configurable production tiers and Sentry DSN.
  • Updates setup instructions and warns against deploying before variables exist.
File Description
lib/​generators/​rolemodel/​heroku/​templates/​deploy-app/​SKILL.md Delegates setup to the script and updates deployment guidance.
lib/​generators/​rolemodel/​heroku/​templates/​deploy-app/​heroku_setup Adds provisioning and deployment automation.
lib/​generators/​rolemodel/​heroku/​README.md Documents the user-run setup script.

Review effort: Balanced

Comment on lines +156 to +157
Never let the deploy workflow run before they exist: with an empty `HEROKU_APP_NAME`
the deploy action creates a randomly named Heroku app instead of failing.
Comment on lines +42 to +43
[[ $BUILDPACKS == *heroku/nodejs* ]] || heroku buildpacks:add --index 1 heroku/nodejs -a "$APP"
[[ $BUILDPACKS == *heroku/ruby* ]] || heroku buildpacks:add heroku/ruby -a "$APP"
Comment on lines +56 to +57
KEY_FILE=config/credentials/$STAGE.key
[[ -f $KEY_FILE ]] || KEY_FILE=config/master.key
heroku labs:enable runtime-dyno-metadata -a "$APP"

step "Deploy $(git branch --show-current)"
git remote get-url "heroku-$STAGE" >/dev/null 2>&1 || heroku git:remote -a "$APP" -r "heroku-$STAGE"
step "Health check"
URL=$(heroku apps:info -a "$APP" --json | jq -r '.app.web_url' | sed 's:/*$::')
for _ in {1..12}; do
STATUS=$(curl -s -o /dev/null -w '%{http_code}' "$URL/up")

Copy link
Copy Markdown
Member

I'll review this tomorrow, but I have a general question. If generators could install skills from the RoleModel/skills repo, would it make sense to move this skill over there? Or is it more likely to be kept up to date here?

I have another PR that installs project level skills for each generator that expects a specific development pattern or requires implementation instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants