Skip to content

Fix deploy-production: fail fast with clear error when Render deploy hook secrets are missing - #11

Draft
asamaraie with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-deploy-production-failure
Draft

Fix deploy-production: fail fast with clear error when Render deploy hook secrets are missing#11
asamaraie with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-deploy-production-failure

Conversation

Copilot AI commented Aug 11, 2026

Copy link
Copy Markdown

The deploy-production job was failing with curl: (3) URL rejected: Malformed input to a URL function because RENDER_SITE_DEPLOY_HOOK and RENDER_API_DEPLOY_HOOK secrets were not set in the production environment — GitHub silently substitutes "" for unset secrets, passing an empty URL to curl.

Changes

  • Validate secrets before use — explicit emptiness checks fail the job immediately with a descriptive ::error:: message pointing to the missing secret name, rather than a cryptic curl error
  • Pass secrets via env: block — avoids interpolating secret values directly into the shell command (security best practice; keeps values out of the expanded command string)
- name: Deploy to production
  env:
    RENDER_SITE_DEPLOY_HOOK: ${{ secrets.RENDER_SITE_DEPLOY_HOOK }}
    RENDER_API_DEPLOY_HOOK: ${{ secrets.RENDER_API_DEPLOY_HOOK }}
  run: |
    if [ -z "$RENDER_SITE_DEPLOY_HOOK" ]; then
      echo "::error::RENDER_SITE_DEPLOY_HOOK secret is not set. Configure it in the production environment."
      exit 1
    fi
    ...
    curl -fsS -X POST "$RENDER_SITE_DEPLOY_HOOK"

Required action: Add RENDER_SITE_DEPLOY_HOOK and RENDER_API_DEPLOY_HOOK to the production environment secrets in Settings → Environments → production.

Co-authored-by: asamaraie <163462140+asamaraie@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job 'deploy-production' Fix deploy-production: fail fast with clear error when Render deploy hook secrets are missing Aug 11, 2026
Copilot AI requested a review from asamaraie August 11, 2026 16:57
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.

2 participants