Add EC2 deployment to CI/CD workflow - #88
Merged
Merged
Conversation
Added EC2 deployment steps to the CI/CD workflow, allowing for deployment to an EC2 instance after successful end-to-end tests.
khemssharma
temporarily deployed
to
khemssharma-patch-1 - Chess PR #88
August 25, 2026 12:25 — with
Render
Destroyed
khemssharma
commented
Aug 25, 2026
khemssharma
left a comment
Owner
Author
There was a problem hiding this comment.
ok fine. Let's try it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
deploy-ec2job to the existing CI/CD workflow so every push tomainthat passes the e2e job also deploys to the EC2 instance (i-0e7228c670843fdc7), in addition to the existing Render deploy.What it does on the box (ubuntu@65.0.131.22, app cloned at ~/chess):
backenddocker compose service (postgres/redis untouched)npm ciat the repo root on the host, then builds and rsyncs theui/frontend to /var/www/chess-frontend (nginx's docroot). The root install is required for ui's tsc build to resolve dotenv/@types/node while type-checking src/tests/runTests.ts.Before merging, add these repository secrets (Settings -> Secrets and variables -> Actions -> New repository secret):
I validated the build and frontend-deploy steps directly on the instance (docker image build, root+ui npm ci/build, rsync to /var/www/chess-frontend all succeeded); the actual
docker compose up -d backendrestart will happen on this workflow's first real run once the secrets are added.