Skip to content

Bind CD deploy job to production environment so AWS deploy config resolves at runtime - #5

Merged
sanket-rajput merged 2 commits into
mainfrom
copilot/fix-failing-github-actions-job
Aug 25, 2026
Merged

sanket-rajput merged 2 commits into
mainfrom
copilot/fix-failing-github-actions-job

Conversation

Copilot AI commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

The Deploy to Production EC2 job failed in Actions because AWS_REGION (and related deploy config) resolved empty at runtime, causing configure-aws-credentials to error before deployment began. This PR scopes the deploy job to the intended GitHub environment and clarifies config placement in deployment docs.

  • Workflow: ensure environment-scoped deploy config is available

    • Updated .github/workflows/deploy.yml to run the deploy job in the production environment.
    • This allows environment-level vars/secrets to resolve for:
      • AWS_REGION
      • EC2_SECURITY_GROUP_ID
  • Docs: clarify where deploy configuration must live

    • Updated deploy/README.md to explicitly state that environment-level values must be set in the production environment for this workflow.
jobs:
  deploy:
    name: Deploy to Production EC2
    runs-on: ubuntu-latest
    environment: production
    env:
      AWS_REGION: ${{ vars.AWS_REGION || secrets.AWS_REGION }}
      EC2_SECURITY_GROUP_ID: ${{ vars.EC2_SECURITY_GROUP_ID || secrets.EC2_SECURITY_GROUP_ID }}

Co-authored-by: sanket-rajput <100849898+sanket-rajput@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job "Deploy to Production EC2" Bind CD deploy job to production environment so AWS deploy config resolves at runtime Aug 25, 2026
Copilot AI requested a review from sanket-rajput August 25, 2026 16:26
@sanket-rajput
sanket-rajput marked this pull request as ready for review August 25, 2026 17:12
@sanket-rajput
sanket-rajput merged commit 1e728ab into main Aug 25, 2026
1 check 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.

2 participants