reposense / RepoSense

Contribution analysis tool for Git repositories
https://reposense.org
MIT License
250 stars 153 forks source link

Generated report is blank #2202

Closed damithc closed 6 months ago

damithc commented 6 months ago

Example https://nus-tic2002-ay2324s2.github.io/ip-dashboard/

ckcherry23 commented 6 months ago

CI run for reference: https://github.com/nus-tic2002-AY2324S2/ip-dashboard/actions/runs/9064874499/job/24904092782

ckcherry23 commented 6 months ago

Based on some initial investigation, seems like the issue might be with GitHub pages deploying sites built with Vite.

Locally, the RepoSense build and frontend build work correctly. This can also be seen in the CI run log output. However, deploying sites built with Vite on GitHub Pages requires configuring the base in vite.config.js as the subdirectory (or repository name) where the report is deployed (eg. /ip-dashboard/)

However, since RepoSense reports will be deployed on multiple GitHub Pages URLs, this will require introducing a new environment variable to specify the base, which is not ideal. We need to verify if this is the actual reason and decide if we just revert the PR or introduce the env variable.

The issue may also be related to #2194 instead, as many of our Surge deployments are also not working (even before the migration to Vite).

ckcherry23 commented 6 months ago

I have verified that the issue is due to the Vite config requirements for GitHub pages. Specifying /ip-dashboard/ as the base in the Vite config allows GitHub to find the required files to display the static site, as can be seen here https://ckcherry23.github.io/ip-dashboard/.

For now, I have created a PR to revert back to Vue CLI. Considering that Vue CLI is in maintenance mode and has security issues with dependencies, we can consider switching back to Vite later with a better solution.

damithc commented 6 months ago

Thanks for the investigation @ckcherry23

damithc commented 6 months ago

https://nus-tic2002-ay2324s2.github.io/ip-dashboard/ works now 👍