Skip to content

feat: Configure React frontend for GitHub Pages deployment via gh-pag…#49

Merged
NotYuSheng merged 1 commit intomainfrom
feature/frontend-gh-pages-deploy
Jun 23, 2025
Merged

feat: Configure React frontend for GitHub Pages deployment via gh-pag…#49
NotYuSheng merged 1 commit intomainfrom
feature/frontend-gh-pages-deploy

Conversation

@NotYuSheng
Copy link
Copy Markdown
Owner

…es package

Summary

This PR configures the React frontend to be deployed via GitHub Pages using the gh-pages npm package.


Changes Made

  • Added homepage field to frontend/package.json
  • Installed gh-pages as a dev dependency
  • Added predeploy and deploy npm scripts to automate the build + deploy process
  • Documented setup and usage in project notes

Context / Rationale

This enables us to deploy the static React frontend for free via GitHub Pages.
It’s especially useful for previewing the app or hosting production builds without managing infrastructure.
This deployment method is suitable since our frontend is fully static and does not require server-side rendering.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @NotYuSheng, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request sets up the necessary configuration and tooling to enable automated deployment of the React frontend application to GitHub Pages. This will allow for easy previewing and hosting of static builds without requiring dedicated infrastructure, leveraging GitHub's free hosting for static sites.

Highlights

  • GitHub Pages Deployment Configuration: Configured the React frontend for deployment to GitHub Pages by adding the homepage field to frontend/package.json and installing the gh-pages npm package as a development dependency.
  • Automated Deployment Scripts: Introduced predeploy and deploy npm scripts in frontend/package.json to automate the build process and subsequent deployment of the static React application to GitHub Pages.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly sets up the React frontend for deployment to GitHub Pages using the gh-pages package. The changes to package.json are logical and follow common practices for this type of deployment.

I have one suggestion regarding the hardcoded homepage URL to improve the project's portability.

Additionally, I recommend updating frontend/README.md to document the new deploy script, as well as other existing scripts like build and test. This will help other developers understand how to work with and deploy the project. For example, you could add:

### `npm run deploy`

Builds the app for production and deploys it to GitHub Pages.

### `npm run build`

Builds the app for production to the `build` folder.

### `npm test`

Launches the test runner in the interactive watch mode.

Comment thread frontend/package.json
@NotYuSheng NotYuSheng merged commit ee4649f into main Jun 23, 2025
@NotYuSheng NotYuSheng deleted the feature/frontend-gh-pages-deploy branch June 23, 2025 13:56
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