Skip to content

Merge branch 'Huynhthuongg-patch-1' into main#31

Merged
Huynhthuongg merged 12 commits into
Huynhthuongg-patch-5from
main
May 23, 2026
Merged

Merge branch 'Huynhthuongg-patch-1' into main#31
Huynhthuongg merged 12 commits into
Huynhthuongg-patch-5from
main

Conversation

@Huynhthuongg

@Huynhthuongg Huynhthuongg commented May 23, 2026

Copy link
Copy Markdown
Member

Summary by cubic

Replaces Azure Web App deployment with a Terraform CI workflow using Terraform Cloud, updates Web Analytics to Vercel’s script, and adds a Node.js CI status badge. Expands README.md with setup and usage docs.

  • New Features

    • Add .github/workflows/terraform.yml using hashicorp/setup-terraform@v1; runs init/fmt/plan on PRs and apply on pushes to main.
    • Update public/index.html to use <script defer src="/_vercel/insights/script.js"></script>; keeps @vercel/speed-insights.
    • Remove .github/workflows/azure-webapps-node.yml to stop Azure auto-deploys.
    • Replace .github/workflows/node.js.yml content with a build status badge link.
  • Migration

    • Add TF_API_TOKEN repo secret for Terraform Cloud.
    • Ensure main.tf uses the Terraform Cloud remote backend with the correct org/workspace.
    • Enable Web Analytics in Vercel and redeploy to start collecting data.

Written for commit 315ebef. Summary will update on new commits. Review in cubic

Huynhthuongg and others added 10 commits May 3, 2026 13:09
Signed-off-by: Huỳnh Thương <admin@huynhthuong.online>
This workflow builds and deploys a Node.js application to Azure Web App
on push to the main branch.

<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Adds a GitHub Actions workflow to build and deploy the Node.js app to
Azure Web App on pushes to main and via manual trigger. It installs,
builds/tests, packages the app, and deploys using an Azure publish
profile.

- **New Features**
- New workflow at .github/workflows/azure-webapps-node.yml with separate
build and deploy jobs.
- Uses Node.js 20.x with npm cache via `actions/setup-node@v4`; runs
install/build/test if present.
- Shares build output via artifacts (`actions/upload-artifact@v4` /
`actions/download-artifact@v4`).
- Deploys with `azure/webapps-deploy@v2`; sets the environment URL from
the deploy step output.

- **Migration**
- Add repo secret `AZURE_WEBAPP_PUBLISH_PROFILE` containing the app’s
publish profile.
- Set `AZURE_WEBAPP_NAME`; optionally adjust `AZURE_WEBAPP_PACKAGE_PATH`
and `NODE_VERSION`.

<sup>Written for commit 3fec9c4.
Summary will update on new commits. <a
href="https://cubic.dev/pr/Huynhthuongg/Claude-OpenAI/pull/18?utm_source=github">Review
in cubic</a></sup>

<!-- End of auto-generated description by cubic. -->

Signed-off-by: Huỳnh Thương <admin@huynhthuong.online>
Reverts #18

<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Removes the Azure Web Apps GitHub Actions workflow to stop automatic
Node.js deployments on pushes to `main`. This reverts the earlier
deployment setup and prevents unintended Azure releases.

<sup>Written for commit 5c9dd39.
Summary will update on new commits. <a
href="https://cubic.dev/pr/Huynhthuongg/Claude-OpenAI/pull/19?utm_source=github">Review
in cubic</a></sup>

<!-- End of auto-generated description by cubic. -->
This workflow installs Terraform CLI and configures it with an API token for Terraform Cloud. It runs `terraform init`, `terraform fmt`, and `terraform plan` on pull requests, and `terraform apply` on pushes to the main branch.

Signed-off-by: Huỳnh Thương <admin@huynhthuong.online>
This workflow installs Terraform CLI and configures it with an API token
for Terraform Cloud. It runs `terraform init`, `terraform fmt`, and
`terraform plan` on pull requests, and `terraform apply` on pushes to
the main branch.

<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Add a GitHub Actions workflow to run Terraform with Terraform Cloud. It
formats and plans on PRs and applies on `main`.

- **New Features**
- Added `.github/workflows/terraform.yml` using `actions/checkout@v4`
and `hashicorp/setup-terraform@v1`.
- Runs `terraform init`, `terraform fmt -check`, and `terraform plan` on
pull requests.
- On pushes to `main`, runs `terraform apply -auto-approve` using
`TF_API_TOKEN`.

- **Migration**
  - Add the `TF_API_TOKEN` GitHub secret for Terraform Cloud.
- Ensure `main.tf` uses the Terraform Cloud `remote` backend with the
correct org/workspace.

<sup>Written for commit fc3795a.
Summary will update on new commits. <a
href="https://cubic.dev/pr/Huynhthuongg/Claude-OpenAI/pull/20?utm_source=github">Review
in cubic</a></sup>

<!-- End of auto-generated description by cubic. -->

Signed-off-by: Huỳnh Thương <admin@huynhthuong.online>
# Vercel Web Analytics Implementation Report

## Summary
Successfully configured Vercel Web Analytics for the claude-openai project following the latest official Vercel documentation.

## Project Details
- **Framework**: Node.js/Express serving static HTML files
- **Package Manager**: npm
- **Project Type**: Backend API with static frontend (public/index.html)

## Changes Made

### Modified Files
1. **public/index.html**
   - Updated Vercel Web Analytics implementation to use the recommended script tag approach
   - Changed from: ESM import using CDN (`import { inject } from 'https://cdn.jsdelivr.net/npm/@vercel/analytics@2/+esm'`)
   - Changed to: Recommended script tag approach (`<script defer src="/_vercel/insights/script.js"></script>`)
   - This follows the official Vercel documentation for HTML5 projects

### Package Information
- **@vercel/analytics**: Version 2.0.1 (already installed)
- **@vercel/speed-insights**: Version 2.0.0 (already installed)

## Implementation Details

According to the latest Vercel documentation (fetched on 2026-04-28):
- For static HTML projects, the recommended approach is to use the script tag: `<script defer src="/_vercel/insights/script.js"></script>`
- This script is automatically served by Vercel after enabling Web Analytics in the dashboard
- The implementation is placed before the closing `</body>` tag for optimal performance

## Configuration Steps Followed
1. ✅ Fetched latest Vercel Analytics documentation from https://vercel.com/docs/analytics/quickstart
2. ✅ Identified project framework (Node.js/Express with static HTML)
3. ✅ Verified @vercel/analytics package was already installed (v2.0.1)
4. ✅ Updated the analytics implementation in public/index.html to use the recommended script tag
5. ✅ Ran npm install to ensure dependencies and lock files are up to date
6. ✅ Tested server startup and verified HTML is served correctly
7. ✅ Verified the analytics script tag is present in the served HTML

## Testing Results
- ✅ Server starts successfully on port 3000
- ✅ Static HTML file is served correctly
- ✅ Analytics script tag is properly included in the HTML output
- ✅ No build errors or warnings
- ✅ Dependencies installed successfully with 0 vulnerabilities

## Next Steps for Activation
To activate Vercel Web Analytics:
1. Navigate to the project's Analytics section in the Vercel dashboard
2. Click the "Enable" button to activate Web Analytics
3. Deploy the project to Vercel
4. After deployment, analytics data will begin collecting automatically
5. View analytics in the Vercel dashboard (data appears within days of deployment)

## Notes
- The project already had @vercel/analytics and @vercel/speed-insights installed
- The previous implementation used an ESM CDN import, which has been replaced with the official Vercel-served script
- The new implementation follows Vercel's recommended best practices for HTML5 projects
- Speed Insights was already properly configured and remains unchanged

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
This workflow builds and deploys a Node.js application to Azure Web App on push to the main branch.

Signed-off-by: Huỳnh Thương <admin@huynhthuong.online>
@vercel

vercel Bot commented May 23, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
claude-open-ai Ready Ready Preview, Comment May 23, 2026 4:12am

@coderabbitai

coderabbitai Bot commented May 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5352d46e-9969-414d-9144-9bd07fc3f8d9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch main
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch main
  • 🛠️ Aethon

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Huynhthuongg Huynhthuongg enabled auto-merge (rebase) May 23, 2026 03:56
@kilo-code-bot

kilo-code-bot Bot commented May 23, 2026

Copy link
Copy Markdown

Kilo Code Review could not run — your account is out of credits.

Add credits or switch to a free model to enable reviews on this change.

@Huynhthuongg Huynhthuongg disabled auto-merge May 23, 2026 03:56

@Huynhthuongg Huynhthuongg left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

A

@Huynhthuongg Huynhthuongg enabled auto-merge (rebase) May 23, 2026 03:56
@Huynhthuongg Huynhthuongg disabled auto-merge May 23, 2026 03:57
Added a badge to the Node.js CI workflow file for build status.

Signed-off-by: Huỳnh Thương <admin@huynhthuong.online>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 issue found across 1 file (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread .github/workflows/node.js.yml
@Huynhthuongg Huynhthuongg enabled auto-merge (rebase) May 23, 2026 06:43
@Huynhthuongg Huynhthuongg disabled auto-merge May 23, 2026 06:43
@Huynhthuongg Huynhthuongg enabled auto-merge (squash) May 23, 2026 06:43
@Huynhthuongg Huynhthuongg disabled auto-merge May 23, 2026 06:43
@Huynhthuongg Huynhthuongg merged commit 3c93d0e into Huynhthuongg-patch-5 May 23, 2026
4 of 10 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.

1 participant