Skip to content

Feat/deploy to githubpages#5

Merged
Soham1803 merged 3 commits intomainfrom
feat/deploy-to-githubpages
Oct 1, 2025
Merged

Feat/deploy to githubpages#5
Soham1803 merged 3 commits intomainfrom
feat/deploy-to-githubpages

Conversation

@Soham1803
Copy link
Owner

The deployment was not considering the name of the repo in the path for resource (model.glb). Fixes this error

@Soham1803 Soham1803 requested a review from Copilot October 1, 2025 15:09
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds GitHub Pages deployment configuration and fixes asset path resolution for the demo application. The changes ensure that assets like SVG icons and 3D models load correctly when deployed to GitHub Pages with the repository-specific base path.

  • Adds GitHub Actions workflow for automated deployment to GitHub Pages
  • Configures Vite build settings to handle GitHub Pages base path in production
  • Implements dynamic asset path resolution to support both local development and GitHub Pages deployment

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
package.json Adds new build and deploy scripts for GitHub Pages workflow
demo/vite.config.ts Configures base path for GitHub Pages and build output settings
demo/src/App.tsx Implements dynamic asset path resolution and updates hardcoded asset references
demo/package.json Adds GitHub-specific build scripts with base path configuration
.github/workflows/deploy.yml Creates GitHub Actions workflow for automated deployment

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 3 to +7

// https://vite.dev/config/
export default defineConfig({
export default defineConfig(({ command, mode }) => ({
plugins: [react()],
})
base: mode === 'production' ? '/TPS-Controls/' : '/',
Copy link

Copilot AI Oct 1, 2025

Choose a reason for hiding this comment

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

The hardcoded repository name '/TPS-Controls/' creates a maintenance burden. Consider using an environment variable or deriving it from package.json to avoid manual updates if the repository is renamed.

Copilot uses AI. Check for mistakes.
"dev": "vite",
"build": "tsc -b && vite build",
"build:github": "vite build --base=/TPS-Controls/",
"build:github-with-types": "tsc -b && vite build --base=/TPS-Controls/",
Copy link

Copilot AI Oct 1, 2025

Choose a reason for hiding this comment

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

The script 'build:github-with-types' appears to be unused since the workflow uses 'build:github'. Consider removing it to avoid confusion, or document when it should be used instead.

Suggested change
"build:github-with-types": "tsc -b && vite build --base=/TPS-Controls/",

Copilot uses AI. Check for mistakes.
@Soham1803 Soham1803 merged commit 9c1860b into main Oct 1, 2025
5 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.

2 participants