How to iterate through folder of files on GitHub using Javascript?

I want to be able to iterate through a local folder of files (CSVs) on GitHub and use the file contents in Javascript. I used this code but it only retrieves the contents of one file:

var array = [];
var file = new XMLHttpRequest();
file.onreadystatechange = function () {
   array.push(this.responseText);
}
file.open("GET", "[csv link]", true);

I read through other questions, and the suggested method was to use PHP, but because I am going to be using this for GitHub pages, PHP isn’t supported. Are there any workarounds to this?