Skip to content

ci#24

Merged
timbrinded merged 1 commit intomasterfrom
ci/fe-deploy
Jan 26, 2026
Merged

ci#24
timbrinded merged 1 commit intomasterfrom
ci/fe-deploy

Conversation

@timbrinded
Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings January 26, 2026 21:12
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new GitHub Actions workflow for deploying the frontend to AWS ECS by forcing a new deployment. The workflow is designed to be manually triggered via workflow_dispatch, with automated push triggers commented out.

Changes:

  • Added a new GitHub Actions workflow file for ECS frontend deployment with OIDC authentication to AWS

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +28 to +29
--cluster cre-examples-cluster \
--service cre-examples-frontend \
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

The cluster name and service name are hardcoded. These should be parameterized using GitHub variables (similar to how AWS_REGION is handled) to improve maintainability and allow easier configuration changes without modifying the workflow file. Consider using ${{vars.AWS_ECS_CLUSTER}} and ${{vars.AWS_ECS_SERVICE_FRONTEND}} or similar variable names.

Suggested change
--cluster cre-examples-cluster \
--service cre-examples-frontend \
--cluster ${{vars.AWS_ECS_CLUSTER}} \
--service ${{vars.AWS_ECS_SERVICE_FRONTEND}} \

Copilot uses AI. Check for mistakes.
Comment on lines +30 to +31
--force-new-deployment \
--region ${{vars.AWS_REGION}} No newline at end of file
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

The --region flag in the AWS CLI command is redundant because the region is already configured in the AWS credentials setup step (line 21). When credentials are configured with aws-region, all subsequent AWS CLI commands in that job will use that region automatically. Removing this redundant flag would make the code cleaner and avoid potential confusion if the two region values ever differ.

Suggested change
--force-new-deployment \
--region ${{vars.AWS_REGION}}
--force-new-deployment

Copilot uses AI. Check for mistakes.
aws ecs update-service \
--cluster cre-examples-cluster \
--service cre-examples-frontend \
--force-new-deployment \
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

The workflow lacks error handling and validation for the ECS deployment. The aws ecs update-service command can fail for various reasons (service not found, insufficient permissions, cluster not available), but there's no mechanism to detect or report these failures effectively. Consider adding validation checks or at least a step to verify the deployment status after forcing the new deployment, such as using aws ecs wait services-stable.

Suggested change
--force-new-deployment \
--force-new-deployment \
--region ${{vars.AWS_REGION}}
- name: Wait for ECS service to become stable (frontend)
env:
AWS_PAGER: ""
run: |
aws ecs wait services-stable \
--cluster cre-examples-cluster \
--services cre-examples-frontend \

Copilot uses AI. Check for mistakes.
Comment on lines +20 to +31
role-to-assume: ${{secrets.AWS_ROLE_TO_ASSUME}}
aws-region: ${{vars.AWS_REGION}}

- name: Force new deployment (frontend)
env:
AWS_PAGER: ""
run: |
aws ecs update-service \
--cluster cre-examples-cluster \
--service cre-examples-frontend \
--force-new-deployment \
--region ${{vars.AWS_REGION}} No newline at end of file
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

Missing consistent spacing in the GitHub expressions. Throughout this file, expressions like ${{secrets.AWS_ROLE_TO_ASSUME}} don't have spaces around the content. However, looking at other workflow files in the repository (e.g., docker-fe.yml lines 32-33, 41-42), the convention is to use spaces: ${{ vars.DOCKERHUB_USERNAME }}. The expressions should follow the established convention of including spaces for consistency.

Copilot uses AI. Check for mistakes.
@timbrinded timbrinded merged commit 46e72fd into master Jan 26, 2026
14 checks 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