Skip to content

Deploy Device Toolbox website with GitHub Pages#1

Closed
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-e2674983-7ccf-42d7-a009-d7bb1d786f6a
Closed

Deploy Device Toolbox website with GitHub Pages#1
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-e2674983-7ccf-42d7-a009-d7bb1d786f6a

Conversation

Copilot AI commented Sep 25, 2025

Copy link
Copy Markdown
Contributor

This PR implements GitHub Pages deployment for the Device Toolbox website, a Vite-based application using TypeScript and Lit web components.

Changes Made

Vite Configuration

  • Updated vite.config.ts to set the correct base path (/toolbox/) for GitHub Pages deployment in production
  • Ensures all assets (JS, CSS, images) are served with the proper path prefix

GitHub Actions Workflow

  • Added .github/workflows/deploy.yml for automated build and deployment
  • Configures Node.js environment, runs linting, builds the project, and deploys to GitHub Pages
  • Includes proper permissions for GitHub Pages deployment

Single Page Application (SPA) Support

  • Added public/404.html to handle client-side routing on GitHub Pages
  • When users navigate directly to routes like /toolbox/vpe, GitHub Pages serves the 404.html which redirects to the main app
  • Updated index.html with redirect handling script to restore correct URLs from the 404 redirect

Router Updates

  • Modified src/utils/router.ts to properly handle the base path
  • Strips the /toolbox prefix in production while maintaining clean internal routing
  • Ensures navigation between pages works correctly with the base path

Testing Results

The deployment has been thoroughly tested locally:

  • ✅ Homepage loads correctly with proper styling at /toolbox/
  • ✅ Client-side routing works for detail pages (/toolbox/vpe, /toolbox/zwa2)
  • ✅ Navigation between pages functions seamlessly
  • ✅ Direct URL access works through 404.html redirect mechanism
  • ✅ No security vulnerabilities detected
  • ✅ All existing lint rules pass

Screenshots

Homepage:
Device Toolbox Homepage

Detail Page (ZWA-2):
ZWA-2 Details Page

Deployment

Once merged, the website will be automatically deployed to GitHub Pages at https://openhomefoundation.github.io/toolbox/. The repository settings need to be configured to enable GitHub Pages with "GitHub Actions" as the deployment source.

The build process includes:

  1. Installing dependencies
  2. Running ESLint for code quality
  3. Building the optimized production bundle
  4. Deploying to GitHub Pages

All changes maintain backward compatibility and don't affect the development workflow.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/OpenHomeFoundation/OpenHomeFoundation%2Ftoolbox/languages
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Deploy this website with github pages


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 2 commits September 25, 2025 20:52
Co-authored-by: balloob <1444314+balloob@users.noreply.github.com>
Co-authored-by: balloob <1444314+balloob@users.noreply.github.com>
Copilot AI changed the title [WIP] Deploy this website with github pages Deploy Device Toolbox website with GitHub Pages Sep 25, 2025
Copilot AI requested a review from balloob September 25, 2025 21:03
@balloob

balloob commented Sep 25, 2025

Copy link
Copy Markdown
Member

@copilot I've added a domain to the main branch in CNAME. It is https://toolbox.openhomefoundation.org

Comment thread index.html
margin: 0;
}
</style>
<script type="text/javascript">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot we don't want this. Remove it.

Copilot AI requested a review from balloob September 25, 2025 21:07
@balloob balloob closed this Sep 25, 2025
@balloob balloob deleted the copilot/fix-e2674983-7ccf-42d7-a009-d7bb1d786f6a branch November 16, 2025 19:22
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