Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6c3d49c
feat(*): automation deployment for staging and prod
Ayush8923 Mar 17, 2026
725f60f
chore: refine log separators in deployment script
Ayush8923 Mar 17, 2026
ff4167b
fix(*): added the environment name in deployment pipeline
Ayush8923 Mar 17, 2026
8d79917
fix(*): update naming convention
Ayush8923 Mar 17, 2026
dd273e3
Merge branch 'main' into feat/frontend-cicd-deployment
Prajna1999 Mar 18, 2026
e8ca6ee
feat: testing CD on branch
Prajna1999 Mar 18, 2026
3e4b468
Merge branch 'main' into feat/frontend-cicd-deployment
Ayush8923 Mar 20, 2026
c1eb2e5
fix(*): update the readme and prduction deployment also
Ayush8923 Mar 20, 2026
baf27bd
Merge branch 'main' of https://github.com/ProjectTech4DevAI/kaapi-fro…
Ayush8923 Mar 26, 2026
7f51fc5
Merge branch 'main' into feat/frontend-cicd-deployment
Ayush8923 Apr 1, 2026
1cf8617
Merge branch 'main' into feat/frontend-cicd-deployment
Ayush8923 Apr 7, 2026
b5dd403
feat(*): for the deployment use aws ssm instead of ssh
Ayush8923 Apr 7, 2026
4b9e34c
Merge branch 'main' into feat/frontend-cicd-deployment
Ayush8923 Apr 13, 2026
f050099
fix(*): formatting
Ayush8923 Apr 13, 2026
da3cece
fix(*): test staging automate deployment
Ayush8923 Apr 13, 2026
8df5ff5
fix(*): fix the home root issue from the ssm agent
Ayush8923 Apr 14, 2026
d51ef7e
fix(*): added the full npm path instead of the full
Ayush8923 Apr 14, 2026
09570ad
fix(*): update the pm2 script
Ayush8923 Apr 14, 2026
c930469
fix(*): update the pm2 script
Ayush8923 Apr 14, 2026
a5fb8a4
fix(*): added the full pm2 path
Ayush8923 Apr 14, 2026
e308975
fix(*): few updates
Ayush8923 Apr 14, 2026
e1a0f8d
fix(*): revert the last deployment changes
Ayush8923 Apr 14, 2026
b9217d9
fix(*): update the branding component
Ayush8923 Apr 14, 2026
56228fd
fix(*): update the deployment
Ayush8923 Apr 14, 2026
c047980
fix(*): update the branch name of the staging deployment script
Ayush8923 Apr 14, 2026
b5e28d9
fix(*): update the push base branch
Ayush8923 Apr 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/cd-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy Kaapi to EC2 Production

on:
push:
tags:
- "v*" # Deploy only when tags like v1.0.0, v2.1.0, etc., are created

jobs:
deploy:
runs-on: ubuntu-latest
environment: AWS_PRODUCTION_ENV

permissions:
packages: write
contents: read
attestations: write
id-token: write

steps:
- name: Checkout Repository
uses: actions/checkout@v6

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Deploy via SSM
run: |
aws ssm send-command \
--instance-ids "${{ secrets.EC2_INSTANCE_ID }}" \
--document-name "AWS-RunShellScript" \
--parameters 'commands=["export HOME=/home/ubuntu && export PATH=/data/.nvm/versions/node/v24.11.0/bin:$PATH && git config --global --add safe.directory ${{ secrets.BUILD_DIRECTORY }} && set -e && cd ${{ secrets.BUILD_DIRECTORY }} && git pull origin main && npm ci && npm run build && sudo -u ubuntu PM2_HOME=/home/ubuntu/.pm2 /data/.nvm/versions/node/v24.11.0/bin/pm2 restart ${{ secrets.PM2_APP_NAME }}"]' \
--region ${{ secrets.AWS_REGION }}
35 changes: 35 additions & 0 deletions .github/workflows/cd-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy Kaapi to EC2 Staging

on:
push:
branches:
- main # Deploy only when changes are pushed to the main branch

jobs:
deploy:
runs-on: ubuntu-latest
environment: AWS_STAGING_ENV

permissions:
packages: write
contents: read
attestations: write
id-token: write

steps:
- name: Checkout Repository
uses: actions/checkout@v6

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Deploy via SSM
run: |
aws ssm send-command \
--instance-ids "${{ secrets.EC2_INSTANCE_ID }}" \
--document-name "AWS-RunShellScript" \
--parameters 'commands=["export HOME=/home/ubuntu && export PATH=/data/.nvm/versions/node/v24.11.0/bin:$PATH && git config --global --add safe.directory ${{ secrets.BUILD_DIRECTORY }} && set -e && cd ${{ secrets.BUILD_DIRECTORY }} && git pull origin main && npm ci && npm run build && sudo -u ubuntu PM2_HOME=/home/ubuntu/.pm2 /data/.nvm/versions/node/v24.11.0/bin/pm2 restart ${{ secrets.PM2_APP_NAME }}"]' \
--region ${{ secrets.AWS_REGION }}
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,20 +137,27 @@ Deployments are automated via a GitHub Actions CD pipeline that SSHes into the E

### Branch Strategy

| Branch | Environment |
| --------- | ----------- |
| `main` | Staging |
| `release` | Production |
| Trigger | Environment |
| ------------------------------------- | ----------- |
| Push to `main` | Staging |
| Tag matching `v*.*.*` (e.g. `v1.0.0`) | Production |

### Pipeline Steps

On every push to `main` or `release`, the pipeline automatically:
**Staging** — on every push to `main`, the pipeline automatically:

1. SSHes into the EC2 instance
2. Runs `git pull` to fetch the latest code
3. Runs `npm run build` to create an optimized production build
4. Restarts the server to apply the new build

**Production** — on every version tag (e.g. `v1.0.0`, `v2.1.0`), the pipeline automatically:

1. SSHes into the EC2 instance
2. Runs `git fetch --tags` and checks out the tag
3. Runs `npm run build` to create an optimized production build
4. Restarts the server to apply the new build

---

## Learn More
Expand Down
15 changes: 2 additions & 13 deletions app/(main)/configurations/prompt-editor/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -396,19 +396,8 @@ function PromptEditorContent() {
style={{ backgroundColor: colors.bg.secondary }}
>
<div className="flex flex-col items-center gap-3">
<div
className="animate-spin rounded-full border-4 border-solid"
style={{
width: "36px",
height: "36px",
borderColor: colors.bg.primary,
borderTopColor: colors.accent.primary,
}}
/>
<p
className="text-sm"
style={{ color: colors.text.secondary }}
>
<div className="animate-spin rounded-full border-4 border-solid w-9 h-9 border-bg-primary border-t-accent-primary" />
<p className="text-sm text-text-secondary">
Loading configuration...
</p>
</div>
Expand Down
Loading