Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mayuran/vercel #33

Closed
wants to merge 14 commits into from
Closed

Conversation

mayuran-deriv
Copy link
Collaborator

@mayuran-deriv mayuran-deriv commented Jan 20, 2025

Summary by Sourcery

Set up preview and production deployments to Vercel.

New Features:

  • Add preview and production deployment workflows.

Enhancements:

  • Remove the hardcoded "/trade-rise-fall" path prefix and update the chart URL.

CI:

  • Add CI workflows to deploy previews to Vercel on pull requests and production deployments on merge to master.

vinu-deriv and others added 12 commits January 20, 2025 11:33
Copy link

sourcery-ai bot commented Jan 20, 2025

Reviewer's Guide by Sourcery

This pull request removes the hardcoded base URL and chart URL, and introduces a new workflow for deploying preview builds to Vercel.

Flow diagram: Updated URL handling without base path

Loading
flowchart TD
    A[Application Start] --> B[BrowserRouter]
    B --> C{Route Request}
    C -->|No base path| D[Direct Route]
    D --> E[Load Component]

    F[Chart Initialization] --> G[Set Charts Path]
    G -->|Direct path| H[/js/smartcharts/]

    style A fill:#f9f9f9
    style B fill:#f0f0f0
    style C fill:#f0f0f0
    style D fill:#f9f9f9
    style E fill:#f9f9f9
    style F fill:#f0f0f0
    style G fill:#f0f0f0
    style H fill:#f9f9f9

File-Level Changes

Change Details Files
Removes the hardcoded base URL for the application.
  • Removes the getChartUrl function from src/common/utils/index.tsx.
  • Removes the assetPrefix configuration from rsbuild.config.ts.
  • Removes the basename from BrowserRouter in src/App.tsx.
  • Removes the <base> tag from index.html.
src/common/utils/index.tsx
rsbuild.config.ts
src/App.tsx
index.html
Sets the SmartCharts public path directly in the Trading page.
  • Removes the import of getChartUrl from src/pages/trading/index.tsx.
  • Sets the SmartCharts public path directly to /js/smartcharts/.
src/pages/trading/index.tsx
Adds GitHub workflows for deploying preview and production builds to Vercel.
  • Adds a new workflow file deploy-preview.yml for deploying preview builds on pull requests to the master branch.
  • Adds a new workflow file deploy-production.yml for deploying production builds on pushes to the master branch.
.github/workflows/deploy-preview.yml
.github/workflows/deploy-production.yml
Updates the entry point for the application.
  • Changes the entry point from src/main.jsx to src/main.tsx.
rsbuild.config.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @mayuran-deriv - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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.

None yet

2 participants